find
OPTIONS | |
---|---|
-xdev | Don't descend directories on other filesystems. |
TESTS | |
---|---|
+n | for greater than n |
-n | for less than n |
n | for exactly n |
-amin n | File was last accessed n minutes ago |
-anewer file | File was last accessed more recently than file was modified |
-atime n | File was last accessed 24n hours ago |
-cmin n | File's status was last changed n minutes ago |
-cnewer file | File's status was last changed more recently than file was modified |
-ctime n | File's status was last changed 24n hours ago |
-empty | File is empty and is either a regular file or a directory |
-fstype type | File is on a filesystem of type type |
-gid n | File's numeric group ID is n |
-group gname | File belongs to group gname (numeric group ID allowed) |
-ilname pattern | Like -lname, but the match is case insensitive |
-iname pattern | Like -name, but the match is case insensitive |
-inum n | File has inode number n |
-iregex pattern | Like -regex, but the match is case insensitive |
-links n | File has n links |
-lname pattern | File is a symbolic link whose contents match shell pattern |
-mmin n | File's data was last modified n minutes ago |
-mtime n | File's data was last modified 24n hours ago |
-name pattern | Base of file name (the path with the leading directories removed) matches shell pattern |
-newer file | File was modified more recently than file |
-nouser | No user corresponds to file's numeric user ID |
-nogroup | No group corresponds to file's numeric group ID |
-perm mode | File's permission bits are exactly mode (octal or symbolic) |
-perm -mode | All of the permission bits mode are set for the file |
-perm /mode | Any of the permission bits mode are set for the file |
-regex pattern | File name matches regular expression pattern |
-samefile name | File refers to the same inode as name |
-size n{cwbkMG} | File uses n units of space |
b = for 512-byte blocks (default) | |
c = for bytes | |
w = for two-byte words | |
k = for Kilobytes | |
M = for Megabytes | |
G = for Gigabytes | |
-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 | |
s = socket | |
D = door (Solaris) | |
-uid n | File's numeric user ID is n |
-used n | File was last accessed n days after its status was last changed |
-user uname | File is owned by user uname (numeric user ID allowed) |
find.txt · Last modified: 2017/10/27 01:09 by 127.0.0.1