VDS Sphera Knowledge Base
| Main / Browse Categories / Unix / Linux / How can I find a particular file using the UNIX find command? |
How can I find a particular file using the UNIX find command?
find [PATH] -name "[FILENAME]"Replace [PATH] with the path to search in and replace [FILENAME] with the name of the file you are looking for. You can run this command for addtional help: find --helpHere are the help results from: find --help
Usage: find [path...] [expression]
default path is the current directory; default expression is -print
expression may consist of:
operators (decreasing precedence; -and is implicit where no others are given):
( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2
EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2
options (always true): -daystart -depth -follow --help
-maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev
tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N
-cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME
-ilname PATTERN -iname PATTERN -inum N -ipath PATTERN -iregex PATTERN
-links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE
-nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN
-size N[bckw] -true -type [bcdpfls] -uid N -used N -user NAME
-xtype [bcdpfls]
actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT
-ok COMMAND ; -print -print0 -printf FORMAT -prune -ls
Report bugs to
Here are a few simple tutorials:http://www.hccfl.edu/pollock/Unix/FindCmd.htm http://www.devdaily.com/unix/edu/examples/find.shtml http://helpdesk.ua.edu/unix/tipsheet/tipv1n10.html
User Comments
|
||||||||
Attachments
| No attachments. |
Related Articles


