Tuesday, March 21, 2017

Bash : Make directory with one command

bash-3.2# mkdir -p {One,Two/{1..3},Three/{a..d},Four,Five/{e..g}}





bash-3.2# find . -ls
2997229    4 drwxr-xr-x   7 root     root         4096 Mar 21 14:42 .
2997230    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./One
2997231    4 drwxr-xr-x   5 root     root         4096 Mar 21 14:42 ./Two
2997232    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Two/1
2997233    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Two/2
2997234    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Two/3
2997235    4 drwxr-xr-x   6 root     root         4096 Mar 21 14:42 ./Three
2997236    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Three/a
2997237    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Three/b
2997238    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Three/c
2997239    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Three/d
2997240    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Four
2997241    4 drwxr-xr-x   5 root     root         4096 Mar 21 14:42 ./Five
2997242    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Five/e
2997243    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Five/f
2997244    4 drwxr-xr-x   2 root     root         4096 Mar 21 14:42 ./Five/g

No comments:

Post a Comment