#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    1
    Rep Power
    0

    HELP !!! mkdir format


    Using only one command, what is the format to create multiple directories with sub directories and seperate permissions for each?

    If that was too easy, I need to do the same for several files going to different locations with their own independent permissions too.
  2. #2
  3. No Profile Picture
    Got source?
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2003
    Location
    Laguna Niguel, California, USA
    Posts
    2,331
    Rep Power
    14
    You can't create more than one directory in one command. You could, however, execute multiple commands at once-- eg) "mkdir -m 0755 outer && mkdir -m 0555 outer/inner" etc. As for the files, do you want files copied from somewhere, or blank files created, etc???
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    India
    Posts
    61
    Rep Power
    12
    If you want to create a directory without creating the intermediate directories then you can use

    mkdir -p /1/2/3/4/5

    where all the intermediate directories 1, 2, 3 and 4 will be automatically created for you.

    As far as permissions are concerned it will be (0777 & umask). I don' t think of any such command which can change the permissions also for the directories in a single command.

    You need to change them individually, if you want separate permissions for them.
    Regards
    JK

IMN logo majestic logo threadwatch logo seochat tools logo