Difference between revisions of "Find"
From MohidWiki
| (One intermediate revision by the same user not shown) | |||
| 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 11: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