首页 > 代码库 > Linux find命令

Linux find命令

一、用文件名查找文件

# find -name "MyCProgram.c" ./backup/MyCProgram.c ./MyCProgram.c 

 二、用文件名查找文件,忽略大小写

# find -iname "MyCProgram.c" ./mycprogram.c ./backup/mycprogram.c ./backup/MyCProgram.c ./MyCProgram.c 

 三、第二层子目录和第四层子目录之间查找passwd文件

# find -mindepth 3 -maxdepth 5 -name passwd ./usr/bin/passwd ./etc/pam.d/passwd 

 参见:http://www.oschina.net/translate/15-practical-linux-find-command-examples?print

           http://www.cnblogs.com/wanqieddy/archive/2011/06/09/2076785.html

           http://blog.csdn.net/abcdef0966/article/details/7607545

Linux find命令