天天看点

find

root@outer:~# find / -name /home/

find: warning: Unix filenames usually don't contain slashes (though pathnames do).  That means that '-name `/home/'' will probably evaluate to false all the time on this system.  You might find the '-wholename' test more useful, or perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ `/home/''.

find / -name home

find / -wholename /home

find / -samefile /home/

find / -print0 | grep -FzZ /home/

试过几种命令,最后:

 find / -name home 查找文件, 或查找带有home目录名的目录

 find / -wholename /home/si 查找目录,  路径必须是绝对路径

 find / -samefile ./PF_RING-6.0.3 查找目录,路径是相对路径或绝对路径

继续阅读