Common Linux Command Flashcards

1
Q

report a snapshot of the current processes.

A

ps command

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

locate a command

A

which command
- look in the directories listed in the users’ search path for the required file

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

determine file type

A

file command

  • find out more about the kind of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

print lines that match patterns

A

grep command

eg

grep -rnw ‘/path/to/somewhere/’ -e ‘pattern’

(find all files containing specific text on Linux)

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

print real and effective user and group IDs

A

id command

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

search for files in a directory hierarchy

A

find command

format:

find -name

eg.

find / -iname “bash*”

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

output the first part of files

A

head command

eg.

head -10 bash.bashrc

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

change file mode bits

A

chmod command

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

output the last part of files

A

tail command

eg

tail -10 bash.bashrc

PS.

-f(–follow) is often used by system administrators to file respectively

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

send a signal to a process

A

kill command

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

an archiving utility

A

tar command

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

list directory contents

A

ls command
eg.

ls -a

ls -a

ls -latr

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

OpenPGP encryption and signing tool

A

gpg command

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

display a tree of processes

A

pstree command

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