Results 1 to 2 of 2
Hey Guys,
mkdir -p work/{inbox,outbox,pending}/{normal,urgent,important}
Can you explain what the above commnd outputs and how it works.
Thanks
Anuj Sharma...
- 09-12-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 1
Help with Command
Hey Guys,
mkdir -p work/{inbox,outbox,pending}/{normal,urgent,important}
Can you explain what the above commnd outputs and how it works.
Thanks
Anuj Sharma
- 09-12-2010 #2Linux Newbie
- Join Date
- Dec 2009
- Posts
- 241
Hi,
mkdir = create directory
-p if it's needed to create a parent directory first do so
work/{inbox,outbox,pending}/{normal,urgent,important}
create the directorys:
work/inbox/normal
work/inbox/urgent
work/inbox/important
...
...
...
work/pending/important
So to say it short:
It's a command to create a little directory tree.
With { } you can give an array to bash.
The script will be started with each given value in it.
P.s.: Hope I got that right, I'm not so sure myself.


Reply With Quote