mkdir options
Hi every one,
I would like to know that is there any option to simplify The usage of -p option in mkdir command Ex:- mkdir -p dir1/sdir1 dir1/sdir2 dir1/sdir3 dir1/sdir1/csdir1 dir1/sdir1/csdir2 It might even extend on requirement so it would be better to have a bit simplified command using whilchord characters or any other thing Thanking you all sravanth.svk |
make clear ur thoughts, so we can help.
|
Quote:
be newly created dir1 as the first parameter, and omit it in the following .... but that's as good as it gets because the script can't conceivably know on which level to create which directory. Cheers, Tink |
You're making it more complicated than it is.
No need for those short directory references when you're going to do this: mkdir -p dir1/sdir1/csdir1 dir1/sdir1/csdir2 Pick your longest paths and put those in a simple text file and execute it. Exactly how many layers do you want to create? This could be a fun challenge to write the smallest script to get the job done. |
Sure, u can process it with this small script, but every time u need create the small script by hand.
Quote:
|
All times are GMT -5. The time now is 03:35 AM. |