mkdir command to create one or more directories at a time
Basic usage Syntax:
mkdir Directory Name
[Email protected]:~/eth10/eth10# mkdir test[email protected]:~/eth10/eth10# lstest[email protected]:~/eth10/eth10#
[Email protected]:~/eth10/eth10# mkdir test1 test2[email protected]:~/eth10/eth10# lstest test1 test2[email protected]: ~/eth10/eth10#
Alternatively we can use-p to recursively create the directory
[Email protected]:~/eth10/eth10# mkdir-p test/test1/test2[email protected]:~/eth10/eth10# find/root/eth10/eth10/- Type D-name test2-print/root/eth10/eth10/test/test1/test2[email protected]:~/eth10/eth10#
Second, if we need to create a directory and set permissions at the same time, we can use-m to create
[Email protected]:~/eth10/eth10# mkdir-m 777 Test1[email protected]:~/eth10/eth10# ls-al Total usage 8drwxr-xr-x 3 root root 4096 August 10:33 testdrwxrwxrwx 2 root root 4096 August 10:39 test1
This article is from the "eth10" blog, make sure to keep this source http://eth10.blog.51cto.com/13143704/1957002
Linux command--mkdir