Personal tools

Difference between revisions of "Find"

From MohidWiki

Jump to: navigation, search
m (1 revision)
 
Line 9: Line 9:
 
Looks only for directories
 
Looks only for directories
 
  > find -type d
 
  > find -type d
 +
 +
Looks only for files (?)
 +
> find -type f
 +
 +
Looks for string in files and displays filename
 +
> find . | xargs grep 'string' -sl
  
 
==External Reference==
 
==External Reference==

Latest revision as of 12:10, 6 July 2010

find is a linux command line tool that allows to list files inside a given root directory.

Example

> find .
> find /

Looks only for directories

> find -type d

Looks only for files (?)

> find -type f

Looks for string in files and displays filename

> find . | xargs grep 'string' -sl

External Reference