作者: empast
2012-05-13 15:29:53
find命令在硬盘驱动器上查找文件。
- -name 按名字查找。比如说,如果想查找子目录/usr中的spell命令,可以采用下面的方法:
# find /usr -name spell -print
- -atime 按照日期查找文件,或者可以指定一个日期范围。例如查找最近一百天没有使用过的程序:
# find /usr/bin -type f -atime +100 -print
- -mtime 按修改时间查找,如查找建立不到一天的新文件或者二十四小时内修改过的文件:
#find /usr/bin -type f -mtime -1 -print
- -xdev 按Windows分区查找,xdev参数把查询操作限制在当前的文件系统之中,检索子目录下所有以.sys结尾的文件:
# find /mnt/dos -name *.sys -print -xdev