Difference between revisions of "cmd/find"
< cmd
Jump to navigation
Jump to search
m (Woozle moved page Linux/commands/find to cmd/find without leaving a redirect: reorganizing command pages) |
|
(No difference)
|
Revision as of 22:24, 13 November 2022
About
The find Linux command searches directory trees for files whose directory information meets particular criteria.
To search by content, use grep.
Examples
Find a file or folder named "kate" somewhere under the current folder:
find -name kate
Find all files or folders with the extension ".txt":
find -name *.txt
View, in realtime, all additions to any file whose extension is ".log":
find . -name "*.log" | xargs tail -f
(This is useful for monitoring web server (e.g. Apache) activity.)
Note that -name
is case-sensitive; use -iname
for case-agnostic.