V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
pythonee
V2EX  ›  问与答

怎么log所有linux shell的调用?

  •  
  •   pythonee · Mar 28, 2013 · 2871 views
    This topic created in 4783 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   ·   2508 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 08:40 · PVG 16:40 · LAX 01:40 · JFK 04:40
    ♥ Do have faith in what you're doing.