Centos中查找文件、目录、内容

1、查找文件

find / -name 'filename'

2、查找文件夹(目录)

find / -name 'path' -type d

  

3、查找内容

find . | xargs grep -ri 'content'

  3.1、只显示文件名称

find . | xargs grep -ril 'content' 只显示文件名称

  

猜你喜欢

转载自www.cnblogs.com/xiaohaojs/p/11401573.html