mkdir [文件名] 建立文件目录.net
rmdir [文件名]删除目录,只能删除非空目录。不能删除文件get
[root@localhost ~]# mkdir /tmp/test/123class
mkdir: 没法建立目录 '/tmp/test/123': 没有那个文件或目录test
[root@localhost ~]# mkdir -p /tmp/test/123file
[root@localhost ~]# ls /tmp/testim
123touch
[root@localhost /]# cd /tmp/test/123/
[root@localhost 123]# touch 111.txt
[root@localhost 123]# ls
111.txt
[root@localhost 123]# tree /tmp/test/
/tmp/test/
└── 123
└── 111.txtimg
1 directory, 1 file
[root@localhost 123]# rm /tmp/test/123/111.txt
rm:是否删除普通空文件 "/tmp/test/123/111.txt"?y
[root@localhost 123]# tree /tmp/test/
/tmp/test/
└── 123删除文件
1 directory, 0 filesdi
咱们不想它出现提示的话,须要使用rm -f 来执行