How can I detect file accesses in Linux?

后端 未结 3 2013
情深已故
情深已故 2020-12-14 04:33

I have a bunch of flows and data processing applications that I occasionally need to spy on, meaning I need to know what files they read. This is mostly to aid in packaging

3条回答
  •  北海茫月
    2020-12-14 05:13

    What I use is something like:

    strace -o file.txt ./command
    

    You can then

    cat file.txt | grep open
    

    to get a list of all the files that the program opened.

提交回复
热议问题