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