Commands to know: find Flashcards
params required in find
first is the path, second is the expression to find
diff between -name and -iname
iname ignores case
how to ignore case when using find
use the -iname flag
logical operators for find
! Not
- a and
- o or
!
not
-a
and
-o
or
b in -type
block device file
c in -type
character device file
d in -type
directory
f in -type
plain file
l in -type
symbolic link
p in -type
FIFO (named pipe)
s in -type
unix domain socket
-user
specifies a user that the file mist belong to. user names as well as numeric UIDs can be given
-group
specifies group
-size
specifies a poarticular size. Plain numbers signify a 512 byte blocks. c for bytes, k for kilobytes. can give a preceeding - or + for lower/upper bound
-atime
access time, files based on the time of last access.
-mtime
modification time
-prem
specifies permissions files must match
How would you search for a particualr name and list with details (ls -l) the result?
find . -name “whatever” -exec ls -l ‘{}’ \;