linux 一次執行多條命令
阿新 • • 發佈:2019-01-10
1、mkdir myfile ; chmod -R 777 myfile
[[email protected] myfile]# mkdir www ; chmod -R 777 www
[[email protected] myfile]# ls
www
[[email protected] myfile]#
2、rmdir www && mkdir www
一個命令錯誤就終止執行
[[email protected] myfile]# rmdir www && mkdir www
[[email protected]
www
[[email protected] myfile]#
3、mkdir www || chmod -R 777 www/
能執行的都會執行,不能執行的給出提示
[[email protected] myfile]# mkdir www || chmod -R 777 www/
mkdir: cannot create directory `www': File exists
[[email protected] myfile]# ls
www
[[email protected] myfile]#