The specification for "find" is as specified in the SUS but with the additional options as specified below.
Measure times (for -amin, -atime, -cmin, -ctime, -mmin, and -mtime) from the beginning of today rather than from 24 hours ago.
Dereference symbolic links. Implies -noleaf.
Descend at most levels (a non-negative integer) levels of directories below the command line arguments. -maxdepth 0 means only apply the tests and actions to the command line arguments.
Do not apply any tests or actions at levels less than levels (a non-negative integer). -mindepth 1 means process all files except the command line arguments.
Equivalent to -xdev as specified in the SUS.
Do not optimize by assuming that directories contain 2 fewer subdirectories than their hard link count.
Print the find version number and exit.
File was last accessed n minutes ago.
File was last accessed more recently than file was modified. -anewer is affected by -follow only if -follow comes before -anewer on the command line.
File's status was last changed n minutes ago.
File's status was last changed more recently than file was modified. -cnewer is affected by -follow only if -follow comes before -cnewer on the command line.
File is empty and is either a regular file or a directory.
Always false.
File is on a filesystem of type type.
File's numeric group ID is n.
Like -lname, but the match is case insensitive.
Like -name, but the match is case insensitive.
File has inode number n.
Like -path, but the match is case insensitive.
Like -regex, but the match is case insensitive.
File is a symbolic link whose contents match shell pattern pattern. The metacharacters do not treat / or . specially.
File's data was last modified n minutes ago.
No user corresponds to file's numeric user ID.
No group corresponds to file's numeric group ID.
File name matches shell pattern pattern.
Any of the permission bits mode are set for the file.
File name matches regular expression pattern. This is a match on the whole path, not a search.
Always true.
In addition to the types specified in the SUS, the letters l and s are also supported and refer to symbolic links and sockets respectively.
File's numeric user ID is n.
File was last accessed n days after its status was last changed.
The same as -type unless the file is a symbolic link. For symbolic links: if -follow has not been given, true if the file is a link to a file of type c; if -follow has been given, true if c is l. In other words, for symbolic links, -xtype checks the type of the file that -type does not check.
True; like -ls but write to file like -fprint.
True; print the full file name into file file. If file does not exist when find is run, it is cre- ated; if it does exist, it is truncated. The file names `/dev/stdout' and `/dev/stderr' are han- dled specially; they refer to the standard output and standard error output, respectively.
True; like -print0 but write to file like -fprint.
True; like -printf but write to file like -fprint.
True; print the full file name on the standard output, followed by a null character. This allows file names that contain newlines to be correctly interpreted by programs that process the find output.
True; print on the standard output, inter- preting \ escapes and % directives. Field widths and precisions can be specified as with the printf C function. Unlike -print, -printf does not add a newline at the end of the string. The escapes and directives are:
Alarm bell.
Backspace.
Stop printing from this immediately and flush the output.
Form feed.
Newline.
Carriage return.
Horizontal tab.
Vertical tab.
A literal backslash (\).
A literal percent sign.
File's last access time in the returned by the C ctime function.
File's last access time in the specified by k, which is either @ or a directive for the C strftime function. The possible values for k are listed below; some of them might not be available on all systems, due to differences in strftime between systems.
seconds since Jan. 1, 1970, 00:00 GMT.
hour (00..23)
hour (01..12)
hour ( 0..23)
hour ( 1..12)
minute (00..59)
locale's AM or PM
time, 12-hour (hh:mm:ss [AP]M)
second (00..61)
time, 24-hour (hh:mm:ss)
locale's time representation (H:M:S)
time zone (e.g., EDT), or nothing if no time zone is determinable
locale's abbreviated weekday name (Sun..Sat)
locale's full weekday name, variable length (Sunday..Saturday)
locale's abbreviated month name (Jan..Dec)
locale's full month name, variable
locale's date and time (Sat Nov 04 12:02:33 EST 1989)
day of month (01..31)
date (mm/dd/yy)
same as b
day of year (001.366)
month (01..12)
week number of year with Sunday as first day of week (00..53)
day of week (0..6)
week number of year with Monday as first day of week (00..53)
locale's date representation (mm/dd/yy)
last two digits of year (00..99)
year (1970...)
File's size in 512-byte blocks (rounded up).
File's last status change time in the returned by the C ctime function.
File's last status change time in the specified by k, which is the same as for %A.
File's depth in the directory tree; 0 means the file is a command line argument.
File's name with any leading directories removed (only the last element).
Type of the filesystem the file is on; this value can be used for -fstype.
File's group name, or numeric group ID if the group has no name.
File's numeric group ID.
Leading directories of file's name (all but the last element).
Command line argument under which file was found.
File's inode number (in decimal).
File's size in 1K blocks (rounded up).
Object of symbolic link (empty string if file is not a symbolic link).
File's permission bits (in octal).
Number of hard links to file.
File's name.
File's name with the name of the command line argument under which it was found removed.
File's size in bytes.
File's last modification time in the returned by the C ctime function.
File's last modification time in the specified by k, which is the same as for %A.
File's user name, or numeric user ID if the user has no name.
File's numeric user ID.
True; list current file in ls -dils on standard output. The block counts are of 1K blocks, unless the environment variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used.
The following operators are supported in order of decreasing precedence. This overrides what is stated in the SUS.
Force precedence.
True if expr is false
Same as ! expr.
And (implied); expr2 is not evaluated if expr1 is false.
Same as expr1 expr2.
Same as expr1 expr2.
Or; expr2 is not evaluated if expr1 is true.
Same as expr1 -o expr2.
List; both expr1 and expr2 are always evaluated. The value of expr1 is discarded; the value of the list is the value of expr2.