find (target)
Find files (POSIX, toybox)
Syntax:
find [-HL] [dir...] [options]
Runs on:
QNX OS
Options:
- -H
 - Follow command line symbolic links.
 - -L
 - Follow all symbolic links.
 - dir
 - The pathname of a directory in which find looks for files.
 
Description:
The find utility recursively descends the directory hierarchy for each file specified by path and seeks files that match operand_expression.
The operand expression follows one or more pathnames. The find utility treats as a pathname all the arguments up to the first one starting with any of these characters:
-  ! (
  Everything after that is part of the operand expression.
The primaries may be combined with the following operators. The operators are listed in order of decreasing precedence:
| Operator | Action | 
|---|---|
| (expression) | True if expression is true. | 
| ! expression | (NOT) Negation of a primary or expression enclosed in parentheses. | 
| expression [-a] expression | (AND) True if both expressions are true. | 
| expression [-o] expression | (OR) True if either expression is true. | 
Primary expressions
Whenever a primary expression uses a number (n), you can optionally
    precede it by a plus (+) or minus (-) sign, which changes
    the meaning as follows:
| Expression | Means | 
|---|---|
| +n | More than n | 
| -n | Less than n | 
| n | Exactly n | 
- -atimen[u]
 - File was accessed n units ago. The possible time units are shown
            in the table below:
Time unit Meaning d Days (default) h Hours m Minutes s Seconds  - -contextpattern
 - Security context of the file matches pattern.
 - -ctime n[u]
 - File was created n units ago. For time units, see -atime.
 - -depth
 - (POSIX) Always true; causes descent of the directory hierarchy to be done so that all entries in the directory are acted on before the directory itself. If no -depth primary is specified, all entries in the directory are acted on after the directory itself. If any -depth primary is specified, it applies to the entire expression, even if the -depth primary isn't normally evaluated.
 - -empty
 - True if the file is a regular file of size zero, or a directory that contains no files.
 - -executable
 - Access (X_OK) permissions and access control list (ACL).
 - -false
 - Always false.
 - -group group
 - True if the file belongs to the group group.
 - iname
 - Ignore case -name.
 - inum n
 - True if the file has inode number n.
 - -ipath
 - Ignore case -path.
 - -links n
 - File has n hard links.
 - -maxdepth n
 - When this flag is set, find descends at most n directory levels down.
 - -mindepth n
 - When this flag is set, find doesn't apply any expressions unless they're at least n directory levels down.
 - -mtime n[u]
 - True if the file was modified n units ago. For time units, see -atime.
 - -name pattern
 - True if the basename of the filename being examined matches a wildcard pattern.
 - -newer file
 - True if the current file has a newer modification time than file.
 - -newerXY file
 - True if the timestamp of the current file (X) is newer than the
              timestamp of the specified file (Y).Not all combinations of X or Y are supported or valid.
X or Y value Meaning aAccess time BBirth time cInode status change time mModification time t(Y only)file is interpreted as a time string; for valid formats, see date (target).
 - -nogroup
 - True if the file belongs to a group ID that isn't known.
 - -nouser
 - True if the file belongs to a user ID that isn't known.
 - -path pattern
 - True if the pathname being examined matches a wildcard pattern.
 - -perm [- | /] mode
 - Any of the permission bits mode are set for the file.
- - = min
 - / = any
 
 - -prune
 - Causes find to ignore directory contents.
 - -quit
 - Causes find to exit immediately.
 - -readable
 - Access (R_OK) permissions and access control list (ACL).
 - -samefile file
 - True if the file is a hard link to file.
 - -size n [c]
 - True if the file size in bytes, divided by 512 and rounded up to the next integer, is n. If n is followed by c the size is in bytes.
 - -true
 - Always true.
 - -type [c]
 - True if the file type is c where c is one
              of:
Filetype Function b Block special file c Character special file d Directory f Regular file l Symbolic link p FIFO s Socket  - -user uname
 - True if file belongs to the user uname.
 - -xdev
 - Always true—stops find from descending past directories that have a different device ID.
 
Actions:
- -delete
 - Remove matching files and directories.
 - -exec
 - Run command with path. The string 
{}is substituted by the current file name being processed. End the command with a semicolon (;) to run each file, or plus (+) sign to collect and run multiple files. - -execdir
 - Run command in files directory.
 - -ok
 - Similar to -exec but find asks the user before executing.
 - okdir
 - Similar to -execdir but find asks the user before executing.
 - Prints the current filename to standard output, followed by a new line.
 - -printf format
 - Print data pertaining to the file currently being evaluated to the standard output, according to the format string.
 - -print0
 - Print the current filename to standard output, followed by a null character.
 
Formatted Printing
The -printf
        primary requires a format string as its arguments. The format string consists of regular
        ASCII characters and a set of special codes starting with percent (%)
        format codes and backslash (\) escape codes.
%b- 512-byte blocks used.
 %f- Basename.
 %G- Numeric group ID.
 %g- Textual group ID.
 %i- Decimal inode.
 %l- Target of symlink.
 %M- Format type or mode of ls.
 %m- Octal mode.
 %P- Path to file minus dir.
 %p- Path to file.
 %s- Size in bytes.
 %T@- Mod time as unixtime.
 %U- Numeric user ID.
 %u- Username.
 %Z- Security context.
 
This utility is provided as part of the toybox package. For information on how to enable it, see toybox.
Contributing author:
Rob Landley and the toybox project (see https://landley.net/toybox/).
