Monitoring Flashcards
1
Q
What is the command to see open files?
A
lsof
i.e lsof /bin/bash
2
Q
What is the command to see what files a process has open?
A
lsof -p
3
Q
How can you use lsof to see which shared libraries a process has open?
A
lsof -p | grep .so
*shared object files
4
Q
How can you use lsof to see where a process is logging to?
A
lsof -p | grep log
5
Q
How do you see what files a user has open?
A
lsof -u
6
Q
How do you use lsof to see open internet connections?
A
lsof -i
7
Q
How do you view output in the terminal whilst simultaneously writing to a file?
A
tee
i.e echo test | tee filetowriteto