You can do this:
cd /tmp
mkdir 1
cd 1
mkdir 2
cd 2
mkdir C
or, you can just do this:
mkdir -p /tmp/1/2/3
From the man page of mkdir
-p, --parents no error if existing, make parent directories as neededYou can also use this option to create more complicated trees. Like this one.
Do that with this:
mkdir -p /tmp/a{1,2,B{1,2}}
No comments:
Post a Comment