- find (搜索范围) -name (文件名):按照指定的文件名查找模式查找文件。
- find (搜索范围) -user (用户名):按照指定的用户名查找模式查找文件。
- find (搜索范围) -size (+多少/-多少/多少):按照指定的文件大小查找模式查找文件(大于多少/小于多少/等于多少)
- 查询 /目录下所有.txt的文件:find / -name *.txt
- -maxdepth #最大深度 -mindepth #最小深度
[root@mail 6wgr.test]# find /mail/* -maxdepth 2 -mindepth 1 -name archive.lock
/mail/6wgr.test/6/archive.lock
/mail/6wgr.test/archive.lock