How can I detect file accesses in Linux?

后端 未结 3 2016
情深已故
情深已故 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:14

    man strace 
    

    example (assume 2343 is the process id):

    # logging part
    strace -p 2343 -ff -o strace_log.txt 
    
    # displaying part
    grep ^open strace_log.txt
    

提交回复
热议问题