TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How To Log Bash History to Syslog

50 点作者 clyfe超过 13 年前

5 条评论

atesti超过 13 年前
What does history -a do? Seems to write the history to disc and not produce something to pipe into logger. How does this work?
评论 #3225097 未加载
评论 #3225075 未加载
LXicon超过 13 年前
i would be a bit worried about accidental passwords getting into the syslog. i have typed passwords out of habit when they were not required or before a remote system responds only to have the password end up as a bash command. i then have to go into the .bash_history file and remove them.
评论 #3225608 未加载
maratd超过 13 年前
This is a very cool solution!<p>Unfortunately, it does not log the output of the command. For those that need to log absolutely everything, check out:<p><a href="https://github.com/jpschewe/rootsh" rel="nofollow">https://github.com/jpschewe/rootsh</a><p>rootsh is a wrapper shell for bash and logs everything.
giulivo超过 13 年前
there is also a library intended to do this. snoopy logger, can easily be preloaded on linux to make it work without changing the existing applications<p><a href="https://github.com/renard/snoopylogger" rel="nofollow">https://github.com/renard/snoopylogger</a>
asharp超过 13 年前
Interesting, but is there anything that can easily process syslog on the other end? ie. split data like this out into something useful?
评论 #3226469 未加载