Centos find files, directories, content

1, Find File

find / -name 'filename'

 

2. Find the folder (directory)

find / -name 'path' -type d

  

3. Find content

find . | xargs grep -ri 'content'

  3.1, only the file name

find |. xargs grep -ril 'content' only displays the file name

  

Guess you like

Origin www.cnblogs.com/xiaohaojs/p/11401573.html