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

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

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

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

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