amonqsq
V2EX  ›  问与答

如何实现完成文件修改时自动生成修改日志

  •  
  •   amonqsq · Aug 11, 2020 · 1723 views
    This topic created in 2124 days ago, the information mentioned may be changed or developed.
    希望能找一个现有的服务程序监控文件修改行为或者文件被修改时触发程序,在一个指定的路径下对应的日志文件更新这次修改的内容。
    平台:win 或者 linux
    (如果没有现有的程序,想请教下在这个情形中如何实现监控或者触发的功能)
    5 replies    2020-08-12 12:46:13 +08:00
    singerll
        1
    singerll  
       Aug 11, 2020 via Android
    修改内容咋追踪,比如 pdf,rar 啥的。。。
    amonqsq
        2
    amonqsq  
    OP
       Aug 11, 2020
    @singerll 请问如果只针对指定格式的文本文件呢?
    marquina
        3
    marquina  
       Aug 11, 2020 via Android
    inotify+git 记录?
    DJQTDJ
        4
    DJQTDJ  
       Aug 12, 2020
    grep -H filename /home/*/.bash_history
    DJQTDJ
        5
    DJQTDJ  
       Aug 12, 2020
    或者安装 Version Control System
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2722 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 05:30 · PVG 13:30 · LAX 22:30 · JFK 01:30
    ♥ Do have faith in what you're doing.