1、rm -r 移除文件
rm -d 移除空文件
2、rm --help 帮助文档查看
man rm 手册
3、which ls 命令所在路径
4、find /xx/xx -name 125.txt ;
find /xx/xx -name '1*' 1开头文件;
find /xx/xx -name '12?????' 12开头,后面5位文件;
find /xx/xx -iname abc 名字为ABC ,忽略大小写 ;
5、按大小搜索
(1k = 2块,1块 = 512 byte)
find /xx/xx -size 6 大小等于6块的文件
find /xx/xx -size +6 大小大于6块的文件
find /xx/xx -size -6 大小小于6块的文件
6、按文件类型搜索
find ./ -type -d 按文件夹类型;
find ./ -type -f 按文件类型;
7、按用户搜索
find ./ -user songxu 按用户搜索;
8、-a 条件连接符
-o 或者
find /home/songxu/Desktop -name 'a*' -a -type d 搜索首字母为a的文件夹
find /home/songxu/Desktop -name 'a*' -a -type f 搜索首字母为a的文件
find /home/songxu/Desktop -name 'a*' -a -name ‘1*’ 搜索首字母为a或者1的文件