Monitoring Flashcards

1
Q

What is the command to see open files?

A

lsof

i.e lsof /bin/bash

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

What is the command to see what files a process has open?

A

lsof -p

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

How can you use lsof to see which shared libraries a process has open?

A

lsof -p | grep .so

*shared object files

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

How can you use lsof to see where a process is logging to?

A

lsof -p | grep log

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

How do you see what files a user has open?

A

lsof -u

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

How do you use lsof to see open internet connections?

A

lsof -i

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

How do you view output in the terminal whilst simultaneously writing to a file?

A

tee

i.e echo test | tee filetowriteto

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