Search Flashcards

1
Q

grep pattern file

A

Search for pattern in file

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

grep -r pattern directory

A

Search recursively for pattern in directory

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

locate name

A

Find files and directories by name

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

find /home/john -name ‘prefix*’

A

Find files in /home/john that start with “prefix”

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

fine /home -size +100m

A

Find files larger than 100MB in /home

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

whereis program

A

Display the location of the binary, source and
manual page files of program

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

which program

A

Display the path of executable that would run if
program is executed.

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