Home Explore Blog CI



man-pages

8th chunk of `find.man`
41848b9db5622b4528d17e8bb60798f9572b4d016e710e650000000100000fd2
 -L and -P and any previous -follow, but the reference file is only examined once, at the time the command line is parsed.  If the reference file cannot be examined (for
       example, the stat(2) system call fails for it), an error message is issued, and find exits with a nonzero status.

       A numeric argument n can be specified to tests (like -amin, -mtime, -gid, -inum, -links, -size, -uid and -used) as

       +n     for greater than n,

       -n     for less than n,

       n      for exactly n.

       Supported tests:

       -amin n
              File was last accessed less than, more than or exactly n minutes ago.

       -anewer reference
              Time of the last access of the current file is more recent than that of the last data modification of the reference file.  If reference is a symbolic link and the -H option or the -L option is in  effect,  then
              the time of the last data modification of the file it points to is always used.

       -atime n
              File  was  last  accessed less than, more than or exactly n*24 hours ago.  When find figures out how many 24‐hour periods ago the file was last accessed, any fractional part is ignored, so to match -atime +1, a
              file has to have been accessed at least two days ago.

       -cmin n
              File’s status was last changed less than, more than or exactly n minutes ago.

       -cnewer reference
              Time of the last status change of the current file is more recent than that of the last data modification of the reference file.  If reference is a symbolic link and the -H option or the -L option is in effect,
              then the time of the last data modification of the file it points to is always used.

       -ctime n
              File’s status was last changed less than, more than or exactly n*24 hours ago.  See the comments for -atime to understand how rounding affects the interpretation of file status change times.

       -empty File is empty and is either a regular file or a directory.

       -executable
              Matches files which are executable and directories which are searchable (in a file name resolution sense) by the current user.  This takes into account access control lists and other permissions artefacts which
              the -perm test ignores.  This test makes use of the access(2) system call, and so can be fooled by NFS servers which do UID mapping (or root‐squashing), since many systems implement access(2)  in  the  client’s
              kernel  and  so  cannot  make use of the UID mapping information held on the server.  Because this test is based only on the result of the access(2) system call, there is no guarantee that a file for which this
              test succeeds can actually be executed.

       -false Always false.

       -fstype type
              File is on a filesystem of type type.  The valid filesystem types vary among different versions of Unix; an incomplete list of filesystem types that are accepted on some version of Unix or another is: ufs, 4.2,
              4.3, nfs, tmp, mfs, S51K, S52K.  You can use -printf with the %F directive to see the types of your filesystems.

       -gid n File’s numeric group ID is less than, more than or exactly n.

       -group gname
              File belongs to group gname (numeric group ID allowed).

       -ilname pattern
              Like -lname, but the match is case insensitive.  If the -L option or the -follow option is in effect, this test returns false unless the symbolic link is broken.

       -iname pattern
              Like -name, but the match is case insensitive.  For example, the patterns ‘fo*’ and ‘F??’ match the file names ‘Foo’, ‘FOO’, ‘foo’, ‘fOo’, etc.  The pattern ‘*foo*‘ will also match a file called ’.foobar’.

       -inum n
              File has inode number smaller than, greater than or exactly n.  It is normally easier to use the -samefile test instead.

       -ipath pattern
              Like -path.

Title: find Tests: -amin, -anewer, -atime, -cmin, -cnewer, -ctime, -empty, -executable, -false, -fstype, -gid, -group, -ilname, -iname, -inum, -ipath
Summary
This section details several tests available in the `find` command. These tests include: `-amin` (access time in minutes), `-anewer` (access time newer than reference), `-atime` (access time in 24-hour periods), `-cmin` (status change time in minutes), `-cnewer` (status change time newer than reference), `-ctime` (status change time in 24-hour periods), `-empty` (empty file or directory), `-executable` (executable file or searchable directory), `-false` (always false), `-fstype` (filesystem type), `-gid` (numeric group ID), `-group` (group name), `-ilname` (case-insensitive `-lname`), `-iname` (case-insensitive `-name`), `-inum` (inode number), and `-ipath` (case-insensitive `-path`).