Difference between revisions of "Find"
From Knoppix Documentation Wiki
m |
m (rm redundant text) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | catrletob | ||
[[find]] is a powerful [[Linux]] command used to locate files in many ways. | [[find]] is a powerful [[Linux]] command used to locate files in many ways. | ||
Line 23: | Line 24: | ||
Where do you find this stuff? If man pages don't have enough examples. Try linux help sites, the old guy's Unix books, or FAQ Unix command web searches. | Where do you find this stuff? If man pages don't have enough examples. Try linux help sites, the old guy's Unix books, or FAQ Unix command web searches. | ||
− | |||
− | |||
− | |||
[[Category:Useful Linux Commands]] | [[Category:Useful Linux Commands]] |
Latest revision as of 13:01, 16 October 2008
catrletob find is a powerful Linux command used to locate files in many ways.
Note: This is perhaps the most complex (grammatically) Unix command there is. Don't worry if it looks confusing. Few Linux pros really know all the ins and outs of it, either.
Examples
find . -print
Locate all files, links, and directories.
find . -name '.txt' -print
Locate all files named .txt, from current dirctory.
[[find /home/knoppix -name '*.bak' -print
Locate all files in other directory, as above.
find . -daystart -cmin -3660 -cmin 0 -name '.txt' -print
Locate all files, named .txt, and have changed yesterday.
find . --maxdepth 1 -type f -print
Locate all "only" files in current directory.
Yes, the grammar and switches can get quite intense.
Where do you find this stuff? If man pages don't have enough examples. Try linux help sites, the old guy's Unix books, or FAQ Unix command web searches.