熱搜:win11繞過硬件限制安裝 一鍵重裝Win10系統(tǒng) 最干凈的u盤啟動盤 真正純凈版的win7系統(tǒng)
時(shí)間:2014-12-04 15:44:53 作者:qipeng 來源:系統(tǒng)之家 1. 掃描二維碼隨時(shí)看資訊 2. 請使用手機(jī)瀏覽器訪問: https://m.xitongzhijia.net/xtjc/20141204/31925.html 手機(jī)查看 評論 反饋
實(shí)例3:創(chuàng)建權(quán)限為777的目錄
命令:
mkdir -m 777 test3
輸出:
。踨oot@localhost test]# mkdir -m 777 test3
[root@localhost test]# ll
總計(jì) 12drwxr-xr-x 2 root root 4096 10-25 17:42 test1
drwxr-xr-x 3 root root 4096 10-25 17:44 test2
drwxrwxrwx 2 root root 4096 10-25 17:46 test3
。踨oot@localhost test]#
說明:
test3 的權(quán)限為rwxrwxrwx
實(shí)例4:創(chuàng)建新目錄都顯示信息
命令:
mkdir -v test4
輸出:
。踨oot@localhost test]# mkdir -v test4
mkdir: 已創(chuàng)建目錄 “test4”
。踨oot@localhost test]# mkdir -vp test5/test5-1
mkdir: 已創(chuàng)建目錄 “test5”
mkdir: 已創(chuàng)建目錄 “test5/test5-1”
。踨oot@localhost test]#
實(shí)例五:一個命令創(chuàng)建項(xiàng)目的目錄結(jié)構(gòu)
參考:https://www.ibm.com/developerworks/cn/aix/library/au-badunixhabits.html
命令:
mkdir -vp scf/{lib/,bin/,doc/{info,product},logs/{info,product},service/deploy/{info,product}}
輸出:
。踨oot@localhost test]# mkdir -vp scf/{lib/,bin/,doc/{info,product},logs/{info,product},service/deploy/{info,product}}
mkdir: 已創(chuàng)建目錄 “scf”
mkdir: 已創(chuàng)建目錄 “scf/lib”
mkdir: 已創(chuàng)建目錄 “scf/bin”
mkdir: 已創(chuàng)建目錄 “scf/doc”
mkdir: 已創(chuàng)建目錄 “scf/doc/info”
mkdir: 已創(chuàng)建目錄 “scf/doc/product”
mkdir: 已創(chuàng)建目錄 “scf/logs”
mkdir: 已創(chuàng)建目錄 “scf/logs/info”
mkdir: 已創(chuàng)建目錄 “scf/logs/product”
mkdir: 已創(chuàng)建目錄 “scf/service”
mkdir: 已創(chuàng)建目錄 “scf/service/deploy”
mkdir: 已創(chuàng)建目錄 “scf/service/deploy/info”
mkdir: 已創(chuàng)建目錄 “scf/service/deploy/product”
。踨oot@localhost test]# tree scf/
scf/
|-- bin
|-- doc
| |-- info
| `-- product
|-- lib
|-- logs
| |-- info
| `-- product
`-- service
`-- deploy
|-- info
`-- product
12 directories, 0 files
。踨oot@localhost test]#
上面就是Linux mkdir命令的用法介紹了,當(dāng)你要創(chuàng)建目錄或子目錄的時(shí)候,就會用到mkdir命令,但使用是有權(quán)限要求的,如果你不具有使用權(quán)限,就無法使用該命令。
發(fā)表評論
共0條
評論就這些咯,讓大家也知道你的獨(dú)特見解
立即評論以上留言僅代表用戶個人觀點(diǎn),不代表系統(tǒng)之家立場