V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
pythonee
V2EX  ›  问与答

怎么log所有linux shell的调用?

  •  
  •   pythonee · 2013-03-28 23:02:36 +08:00 · 2469 次点击
    这是一个创建于 4083 天前的主题,其中的信息可能已经有所发展或是发生改变。
    当然不是指bash里的操作,然后history查看那种

    现实中,可能有很多后台程序或是其他脚本调用shell命令来对主机进行操作,这些操作好像没有记录到history中,现在所想追踪所有shell调用,无论是谁,无论是怎么发起的。不知道这个想法靠谱不
    2 条回复    1970-01-01 08:00:00 +08:00
    swulling
        1
    swulling  
       2013-03-28 23:45:40 +08:00
    修改shell程序,打印log就好了。。
    binux
        2
    binux  
       2013-03-28 23:47:52 +08:00
    set -x
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   931 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 22:43 · PVG 06:43 · LAX 15:43 · JFK 18:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.