Commands to know: find Flashcards

1
Q

params required in find

A

first is the path, second is the expression to find

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

diff between -name and -iname

A

iname ignores case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how to ignore case when using find

A

use the -iname flag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

logical operators for find

A

! Not

  • a and
  • o or
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

!

A

not

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

-a

A

and

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

-o

A

or

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

b in -type

A

block device file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

c in -type

A

character device file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

d in -type

A

directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

f in -type

A

plain file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

l in -type

A

symbolic link

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

p in -type

A

FIFO (named pipe)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

s in -type

A

unix domain socket

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

-user

A

specifies a user that the file mist belong to. user names as well as numeric UIDs can be given

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

-group

A

specifies group

17
Q

-size

A

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

18
Q

-atime

A

access time, files based on the time of last access.

19
Q

-mtime

A

modification time

20
Q

-prem

A

specifies permissions files must match

21
Q

How would you search for a particualr name and list with details (ls -l) the result?

A

find . -name “whatever” -exec ls -l ‘{}’ \;