检索 bash 的输出历史

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14894461/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 04:34:44  来源:igfitidea点击:

Retrieving bash's output history

linuxbashhistory

提问by user1611830

I am using Mac OSX and I am looking for a command that retrieves the history of the outputs (when they exist) of the commands that I ran. Is it possible ?

我正在使用 Mac OSX,我正在寻找一个命令来检索我运行的命令的输出历史记录(当它们存在时)。是否可以 ?

回答by replay

I think Bash only keeps a history of the commands you entered. You can retrieve it by entering 'history'. But I don't think that Bash stores the output of these commands anywhere, this would have to be a feature of your terminal emulator.

我认为 Bash 只保留您输入的命令的历史记录。您可以通过输入“历史记录”来检索它。但我不认为 Bash 将这些命令的输出存储在任何地方,这必须是终端模拟器的一个功能。