November 29th, 2003, 07:51 PM
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.
November 29th, 2003, 09:17 PM
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???
December 6th, 2003, 10:21 PM
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.