|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Create nested directories?
Is there a tool for creating nested directories,for example creating dir1/dir2/dir3/lastdir.I know that I can do this with MKDIR like this,but its too much typing:
mkdir dir1 dir1/dir2 dir1/dir2/dir3 dir1/dir2/dir3/lastdir Is there a tool where I can pass some nested directories as argument and it will create them automatically? |
|
#2
|
||||
|
||||
|
If there isn't already it wouldn't be too hard to make a script that does it for you.
|
|
#3
|
|||
|
|||
|
Actually,I already made a little C++ app which does that.But maybe there already is a Linux/GNU app which does that.
|
|
#4
|
||||
|
||||
|
I just whipped one up in perl for fun, but I'm on a windoze box at the moment. I'll test it and pop it out on the web somewhere when I get home tonight if you want it. But, if you already made one, then I'd have to say yes, one exists
![]() |
|
#5
|
|||
|
|||
|
Lol,no let me post my app,its GPL so you get the source (how w00t).
|
|
#6
|
||||
|
||||
|
Heh, we could just start competing empires in the brutal "nested directory creation" field. Or, maybe we could partner and take on the monopoly that Microsoft has on the dir command. We'll bring down Microsoft one tiny bit at a time. First the dir command, tomorrow the world!
Mine, uh, doesn't have a license cuz I just now made it and I'm too lazy to go get the GPL stuff to add to it... maybe I'll make mine for Windoze instead could you see windoze people trying to figure out the syntax of a command line program that only takes arguments and doesn't dipslay any hand-holding lists or GUI? |
|
#7
|
|||
|
|||
|
Lol,soon the whole world will be mine!
The only thing that stands between me and absolute power over the whole world is a good name for my app.Since I will be calling it a lot from my terminal,I need a good,short name... Don't get me wrong,I am too lazy for that too,but Kdevelop can automatically add the license to your code ![]() It would be a waste of your time,Windows users are too stupid to figure out how to use the Start button,a command line app will totally freak them out. Last edited by Tuxie : September 14th, 2002 at 09:55 AM. |
|
#8
|
||||
|
||||
|
How about calling it
end - end nests directories I think most *nix people are amused at stupid names like that...
__________________
Online Designer Baby Clothes Store FiftyFifty Web Page, advertising space, with 50% profit share Free web development scripts! Tattoo Blog Free graphical wedding tickers |
|
#9
|
||||
|
||||
![]() I called mind mknd - MaKe Nested Directories just for the hell of it. Needless to say, I intend NOT to ever distribute it under this name unless I become pure evil.... [sidetrack] Man.... they aren't kidding when they tell you gclib takes forever to compile.... [/sidetrack] |
|
#10
|
||||
|
||||
|
Ahem, one could always use the "-p" (make parent directories) option of the mkdir command. . .
Looks like your empires go up in smoke. Saves you the trouble of an anti-trust suit, though. |
|
#11
|
|||
|
|||
|
I was thinking about mndir,but its too plain.I want something fun.If I come up with a nice name,Ill release it and konqueror (
) the whole world!Good idea,but I want something that is more weird than that.And the nix app names are not stupid,I think that they are better than the stupid MS names (come one,how can you call your OS Windows?Let's make an OS called Doors...). Btw,nix means snow in Latin ![]() Last edited by Tuxie : September 14th, 2002 at 12:35 PM. |
|
#12
|
||||
|
||||
|
Quote:
Awwwww..... you always ruin all our fun ![]() |
|
#13
|
|||
|
|||
|
and its a bit too late
besides,why type -p if my app does it automatically? ![]() |
|
#14
|
||||
|
||||
|
Here's a reason: because your app won't be installed as standard gear on every *nix distribution on the face of the earth?
Or to answer with a question: why type "rm -Rf" to remove a directory recursively? Perhaps you should write an app for that too? Hard to tell if you're kidding or not. . .If you are, then take the above comments as jokes, too. |
|
#15
|
||||
|
||||
|
Here's a hint for you- you can create an alias in your .bashrc file to allow a command to have options assigned to it automatically-
for instance, adding Code:
alias mkdir='mkdir -p' would cause mkdir to always create parent directories by default, obviating the need for your script and for any extra typing at all. Not attacking you, it's just that the moral if this story is that most problems like this have already been solved, and "man" is your best friend. |