= 1073741824 bytes)
The size is simply the st_size member of the struct stat populated by the lstat (or stat) system call, rounded up as shown above. In other words, it’s consistent with the result you get for ls -l. Bear in
mind that the ‘%k’ and ‘%b’ format specifiers of -printf handle sparse files differently. The ‘b’ suffix always denotes 512‐byte blocks and never 1024‐byte blocks, which is different to the behaviour of -ls.
The + and ‐ prefixes signify greater than and less than, as usual; i.e., an exact size of n units does not match. Bear in mind that the size is rounded up to the next unit. Therefore -size -1M is not equiva‐
lent to -size -1048576c. The former only matches empty files, the latter matches files from 0 to 1,048,575 bytes.
-true Always true.
-type c
File is of type c:
b block (buffered) special
c character (unbuffered) special
d directory
p named pipe (FIFO)
f regular file
l symbolic link; this is never true if the -L option or the -follow option is in effect, unless the symbolic link is broken. If you want to search for symbolic links when -L is in effect, use -xtype.
s socket
D door (Solaris)
To search for more than one type at once, you can supply the combined list of type letters separated by a comma ‘,’ (GNU extension).
-uid n File’s numeric user ID is less than, more than or exactly n.
-used n
File was last accessed less than, more than or exactly n days after its status was last changed.
-user uname
File is owned by user uname (numeric user ID allowed).
-wholename pattern
See -path. This alternative is less portable than -path.
-writable
Matches files which are writable 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.
-xtype c
The same as -type unless the file is a symbolic link. For symbolic links: if the -H or -P option was specified, true if the file is a link to a file of type c; if the -L option 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.
-context pattern
(SELinux only) Security context of the file matches glob pattern.
ACTIONS
-delete
Delete files or directories; true if removal succeeded. If the removal failed, an error message is issued and find’s exit status will be nonzero (when it eventually exits).
Warning: Don’t forget that find evaluates the command line as an expression, so putting -delete first will make find try to delete everything below the starting points you specified.
The use of the -delete action on the command line automatically turns on the -depth option. As in turn -depth makes -prune ineffective, the -delete action cannot usefully be combined with -prune.
Often, the user might want to test a find command line with -print prior to adding -delete for the actual removal run. To avoid surprising results, it is usually best to remember to use -depth explicitly dur‐
ing those earlier test runs.
The -delete action will fail to remove a directory unless it is empty.
Together with the -ignore_readdir_race option, find will ignore errors of the -delete action in the case the file