Last Updated: September 03, 2018
·
495
· zunda

See what files are opened from a command

$ strace -o <command>.trace -e trace=file <command>
$ grep ^open <command>.trace | grep -v '= -1' | cut -d\" -f2 | sort -u

1 Response
Add your response

Thanks! lsof is good at having a snap shot while strace is good to create a complete list :)

over 1 year ago ·