deepin的终端信息自动保存成文件
Tofloor
poster avatar
y***6@126.com
deepin
2020-01-04 20:54
Author
如何自动将所有deepin输入输出保存为文件,方便查阅。用管道符是可以实现,但每个命令后面都得加,比较麻烦,有没有其他思路?
Reply Favorite View the author
All Replies
avatar
h***a@gmail.com
deepin
2020-01-05 01:04
#1
楼主是要查询run.log 或者类似的日志文件么?
Reply View the author
avatar
ghostry
deepin
2020-01-05 01:48
#2
输入是有的,  ~/.bash_history
Reply View the author
avatar
y***6@126.com
deepin
2020-01-11 01:12
#3
https://bbs.deepin.org/post/187674
输入是有的,  ~/.bash_history

我的deepin没有这个目录
Reply View the author
avatar
y***6@126.com
deepin
2020-01-11 01:16
#4
https://bbs.deepin.org/post/187674
输入是有的,  ~/.bash_history

哦,忘记日志这茬了,记录终端的日志文件在那个位置,什么名字,我的deepin中搜索不到run.log文件
Reply View the author
avatar
y***6@126.com
deepin
2020-01-11 01:18
#5
https://bbs.deepin.org/post/187674
楼主是要查询run.log 或者类似的日志文件么?

这个日志文件是专门记录终端活动的么?
Reply View the author
avatar
走钢丝
deepin
2020-01-11 01:29
#6
https://bbs.deepin.org/post/187674
我的deepin没有这个目录

没看前面带 . 么,这是隐藏文件。
Reply View the author
avatar
y***6@126.com
deepin
2020-01-11 01:47
#7
https://bbs.deepin.org/post/187674
没看前面带 . 么,这是隐藏文件。

看到带点了,原来这个是文件,不是目录,在目录里面没找到
可是~/.bash_history文件里面只记录了曾经输入的命令,终端输出没有记录
Reply View the author
avatar
走钢丝
deepin
2020-01-11 02:08
#8
本帖最后由 lidanger 于 2020-1-10 18:11 编辑
https://bbs.deepin.org/post/187674
看到带点了,原来这个是文件,不是目录,在目录里面没找到
可是~/.bash_history文件里面只记录了曾经输入 ...

网上搜了下,似乎可以用 script 命令。参考:https://blog.csdn.net/piaoxuan1987/article/details/78765124
Reply View the author
avatar
ghostry
deepin
2020-01-11 05:22
#9
https://bbs.deepin.org/post/187674
网上搜了下,似乎可以用 script 命令。参考:https://blog.csdn.net/piaoxuan1987/article/details/787651 ...

这个厉害,相当于命令行录屏了.
Reply View the author
avatar
走钢丝
deepin
2020-01-11 05:32
#10
https://bbs.deepin.org/post/187674
这个厉害,相当于命令行录屏了.

确实,刚觉挺不错。。而且两个命令 deepin 默认都安装的有,方便。
Reply View the author
avatar
走钢丝
deepin
2020-01-11 05:34
#11
https://bbs.deepin.org/post/187674
这个厉害,相当于命令行录屏了.

不过感觉楼主要的并不是这种,因为保存下来的内容有格式字符,不纯净。
Reply View the author