find命令的完整语法格式:
find [path] [options] [tests] [actions]
实例:
1、 find /home/franky/Desktop/ -name "*~" -print
2、 find / -mount -name wish -print (-mount表示不必挂载其他的文件系统)
3、 find . -newer file1 -type f -print (在当前目录下,找出比file1还要新的文件;-type f 测试是否为普通文件)
4、 find . -name "*~" -print -type f -exec rm {} /; (删除当前目录下所有以~结尾的文件;“/;“用来终止-exec选项;{}传递当前文件的完整路径)
5、 find /home/franky/Desktop/ -name "*~" -print -type f -exec rm {} /;
find命令的使用
最新推荐文章于 2024-06-23 14:30:00 发布