`find’ Cheat Sheet
The process of searching with `find’ is about combining three things;
- The start point for the search
- The type of criteria or property that we are going to be evaluating on our search
- The specific value of the criteria we want to search against.
Numeric arguments below can be specified as;
- +n : for greater than n,
- -n : for less than n,
- n : for exactly n.
We can also employ wildcards to assist in matching names.
-
-namepattern : the file name which matches the pattern pattern -
-inamepattern : Like-name, but the match is case insensitive -
-mminn : the file’s data was last modified n minutes ago -
-mtimen : the file’s data was last modified n *24 hours ago -
-newerfile : the file was modified more recently than file -
-aminn : the file was last accessed n minutes ago. -
-atimen : the file was last accessed n * 24 hours ago -
-useruname : the file is owned by user uname -
-groupgname : the file belongs to group gname -
-executable: matches files which are executable and directories which are searchable -
-typec : the file is of type c:-
bblock (buffered) special -
ccharacter (unbuffered) special -
ddirectory -
pnamed pipe (FIFO) -
fregular file -
lsymbolic link -
ssocket
-
-
-sizen[cwbkMG] : File uses n units of space (rounding up). The following suffixes can be used:-
bfor 512-byte blocks (this is the default if no suffix is used) -
cfor bytes -
wfor two-byte words -
kfor Kilobytes (units of 1024 bytes) -
Mfor Megabytes (units of 1048576 bytes) -
Gfor Gigabytes (units of 1073741824 bytes)
-
-
-permmode: The files have a specific set of permissions with mode different depending on how we want to access them-
modeFile’s permission bits are exactly mode -
-modeAll of the permission bits mode are set for the file. -
/modeAny of the permission bits mode are set for the file.
-