pythonee
V2EX  ›  问与答

怎么log所有linux shell的调用?

  •  
  •   pythonee · Mar 28, 2013 · 2905 views
    This topic created in 4804 days ago, the information mentioned may be changed or developed.
    当然不是指bash里的操作,然后history查看那种

    现实中,可能有很多后台程序或是其他脚本调用shell命令来对主机进行操作,这些操作好像没有记录到history中,现在所想追踪所有shell调用,无论是谁,无论是怎么发起的。不知道这个想法靠谱不
    2 replies    1970-01-01 08:00:00 +08:00
    swulling
        1
    swulling  
       Mar 28, 2013
    修改shell程序,打印log就好了。。
    binux
        2
    binux  
       Mar 28, 2013
    set -x
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1081 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 23:39 · PVG 07:39 · LAX 16:39 · JFK 19:39
    ♥ Do have faith in what you're doing.