Linux command detailed find

Source: Internet
Author: User

Find

can explain:Locate the file or directory.

Syntax:Find [Directory ...] [-amin < mins;] [-anewer < reference documents or directories;] [-atime <24 hours;] [-cmin < mins;] [-cnewer < reference documents or directories;] [-ctime <24 hours;] [-daystart] [-depyh] [-empty] [-exec < execution instructions;] [-false] [-fls < list file;] [-follow] [-fprint < list file;] [-fprint0 < list file;] [-fprintf < list file >< output format;] [-fstype < file system type;] [-gid < group identification Code;] [-group < group name;] [-help] [-ilname < template style;] [-iname < template style;] [-inum <inode number;] [-ipath < template style;] [-iregex < template style;] [Number of-links < connections;] [-lname < template style;] [-ls] [-maxdepth < catalogue level;] [-mindepth < catalogue level;] [-mmin < mins;] [-mount]
[-mtime <24 hours >][-name < template style >][-newer < reference file or directory >][-nogroup][noleaf] [-nouser][-ok < execute directive > ][-path < Template style >][-perm < permissions value >][-print][-print0][-printf < output format >][-prune][-regex < template style >][- Size < file >][-true][-type < file type >][-uid < user identification Code >][-used < days >][-user < owner name >][-version][ -xdev][-xtype < file type;]

Additional notes:the Find directive is used to find files that match the criteria. Any string that precedes the parameter will be treated as the directory you want to find.

Parameters:
-amin< minutes > Find files or directories that have been accessed at a specified time, in minutes.
-anewer< Reference file or directory > find its access time is closer to the current file or directory than the specified file or directory.
-atime<24 hours > Find files or directories that have been accessed at a specified time, measured in 24 hours.
-cmin< minutes > Find the file or directory that was changed at the specified time.
-cnewer< Reference file or directory > find the change time is closer to the current file or directory than the specified file or directory.
-ctime<24 hours > Find the file or directory that was changed at the specified time, measured in 24 hours.
-daystart The time from this day onwards.
-depth starts from the deepest subdirectory of the specified directory.
-expty look for files with a file size of 0 byte, or empty directories without any subdirectories or files in the directory.
-exec< executes the directive > assumes that the return value of the Find command is true.
-false Sets the callback value of the Find command to False.
-fls< List File > This parameter has the same effect as specifying the "-ls" parameter, but saves the result as a specified list file.
-follow exclude symbolic connections.
-fprint< List File > This parameter has the same effect as specifying the "-print" parameter, but saves the result to the specified list file.
-fprint0< List File > This parameter has the same effect as specifying the "-print0" parameter, but saves the result to the specified list file.
-fprintf< list file >< output format > This parameter has the same effect as specifying the "-printf" parameter, but saves the result to the specified list file.
-fstype< File System type > only look for files or directories under the file system type.
-gid< Group Identification code > find the file or directory that matches the specified group ID.
-group< Group name > Find the file or directory that matches the specified group name.
-help or--help online Help.
-ilname< Template Style > This parameter has the same effect as specifying the "-lname" parameter, but ignores the difference in case of the character.
-iname< Template Style > This parameter has the same effect as specifying the "-name" parameter, but ignores the difference in case of the character.
-inum<inode number > Find the file or directory that matches the specified inode number.
-ipath< Template Style > This parameter has the same effect as specifying the "-ipath" parameter, but ignores the difference in case of the character.
-iregex< Template Style > This parameter has the same effect as specifying the "-regexe" parameter, but ignores the difference in case of the character.
-links< number of connections > Find a file or directory that matches the specified number of hard connections.
-iname< Template Style > Specify string as the template style for finding symbolic joins.
-ls If the return value of the Find directive is true, the file or directory name is listed to standard output.
-maxdepth< Directory level > Set maximum directory level.
-mindepth< Directory level > Set minimum directory level.
-mmin< minutes > Find files or directories that have been changed at a specified time, in minutes.
-mount The effect of this parameter is the same as specifying "-xdev".
-mtime<24 hours > Find files or directories that have been changed at a specified time, measured in 24 hours.
-name< Template Style > Specify string as the template style for finding files or directories.
-newer< Reference file or directory > find the change time is closer to the current file or directory than the specified file or directory.
-nogroup Find files or directories that are not part of the local landlord cluster identification code.
-noleaf does not consider that a directory must have at least two hard connections present.
-nouser Find files or directories that do not belong to the local host user ID.
-ok< execute directive > This parameter has the same effect as specifying the "-exec" parameter, but the user is asked before executing the instruction, and if the "Y" or "Y" is answered, the execution instruction is discarded.
-path< Template Style > Specify string as the template style for the search table of contents.
-perm< Permissions value > find the file or directory that matches the specified permission value.
-print If the return value of the Find directive is true, the file or directory name is listed to standard output. The format is a name for each column with a "./" string before each name.
-print0 If the return value of the Find directive is true, the file or directory name is listed to standard output. All names in the format are on the same line.
-printf< Output Format > If the return value of the Find directive is true, lists the file or directory name to standard output. The format can be specified by itself.
-prune does not look for strings as a template style for finding files or directories.
-regex< Template Style > Specify string as the template style for finding files or directories.
-size< File Size > Find files that match the specified file size.
-true Sets the callback value of the Find command to True.
-typ< File type > Find only files that match the specified file type.
-uid< user Identification code > find the file or directory that matches the specified user ID.
-used< days > Find files or directories that have been accessed at a specified time after a file or directory has been changed, the units are calculated on a daily basis.
-user< owner name > Find the file or directory that matches the specified owner name.
-version or--version displays version information.
-xdev limits the scope to the antecedent file system.
-xtype< File type > The effect of this parameter is similar to specifying the "-type" parameter, except that it checks for symbolic connections.

Linux command detailed find

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.