mkdir create multiple subdirectories at same time - Solaris

This is a discussion on mkdir create multiple subdirectories at same time - Solaris ; Hi, How to make multiple subdirectories at one time seems not work on solaris 10. Following command does not work: mkdir -p /dir1/dir2/{dir3,dir4/{dir5,dir6/dir7/dir8,dir9,dir10}} What's correct syntax? Simon...

+ Reply to Thread
Results 1 to 3 of 3

Thread: mkdir create multiple subdirectories at same time

  1. mkdir create multiple subdirectories at same time

    Hi,

    How to make multiple subdirectories at one time seems not work on
    solaris 10. Following command does not work:

    mkdir -p /dir1/dir2/{dir3,dir4/{dir5,dir6/dir7/dir8,dir9,dir10}}

    What's correct syntax?

    Simon

  2. Re: mkdir create multiple subdirectories at same time

    On Wed, 19 Sep 2007 23:49:24 -0700, Simon Gao wrote:
    | Hi,
    |
    | How to make multiple subdirectories at one time seems not work on
    | solaris 10. Following command does not work:
    |
    | mkdir -p /dir1/dir2/{dir3,dir4/{dir5,dir6/dir7/dir8,dir9,dir10}}
    |
    | What's correct syntax?


    What shell are you using?

    Can you be a bit more specific about "does not work"? Does it create
    any directories at all? What error messages (if any) are produced?
    If it does create some directories, what are they?

    Oh, what directories did you expect it to create?


    --
    Reverend Paul Colquhoun, ULC. http://andor.dropbear.id.au/~paulcol
    Asking for technical help in newsgroups? Read this first:
    http://catb.org/~esr/faqs/smart-questions.html#intro

  3. Re: mkdir create multiple subdirectories at same time

    Simon Gao wrote:
    > How to make multiple subdirectories at one time seems not work on
    > solaris 10. Following command does not work:
    >
    > mkdir -p /dir1/dir2/{dir3,dir4/{dir5,dir6/dir7/dir8,dir9,dir10}}
    >
    > What's correct syntax?


    It depends on your shell. It should work with bash, zsh, tcsh.
    It's the shell that expands the braces, not 'mkdir'.

+ Reply to Thread