有没有人知道一种方法来破解bash来截取并保存它执行的每个命令的输出?
发布于 2012-08-15 02:40:48
可以将GNU screen实用程序( http://www.gnu.org/software/screen/ )与-L开关一起使用
发布于 2012-09-23 02:19:03
我对此进行了一些思考,在最简单的形式下,您会得到以下内容:
$ cat clone
#! /bin/bash
bash -i |tee >(cat >>/tmp/bash.log.$$)
# $ vim clone
# Vim: Warning: Output is not to a terminal
$ ./clone
$ du -sb /tmp/bash.log.9609
29 /tmp/bash.log.9609
109 /tmp/bash.log.9609
161 /tmp/bash.log.9609
213 /tmp/bash.log.9609https://stackoverflow.com/questions/11944534
复制相似问题