• 请不要在回答技术问题时复制粘贴 AI 生成的内容
kisshere
V2EX  ›  程序员

Linux 怎么查看最后一次对某文件夹的操作命令是啥?

  •  
  •   kisshere · Mar 16, 2020 · 2395 views
    This topic created in 2271 days ago, the information mentioned may be changed or developed.

    一个文件夹突然冒出来很多文件,怎样查看这些文件是通过何种命令产生的

    5 replies    2020-03-17 13:25:49 +08:00
    inhzus
        1
    inhzus  
       Mar 16, 2020
    我想到的不完美替代方法是:查看文件的修改时间,然后按时间查 bash_history
    amosbird
        2
    amosbird  
       Mar 16, 2020   ❤️ 1
    事后发生基本无法 trace,可以事前用 audit 加上 file system watch
    scriptB0y
        3
    scriptB0y  
       Mar 16, 2020
    如果进程还存在的话,可以用 fuser 看看
    orm
        4
    orm  
       Mar 17, 2020 via iPhone
    history | grep 文件名
    dianso
        5
    dianso  
       Mar 17, 2020
    百度下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1049 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 22:34 · PVG 06:34 · LAX 15:34 · JFK 18:34
    ♥ Do have faith in what you're doing.