Jos*_*osh 12 bash gnu-screen command-history
我当前的screen会话有 12 个打开的窗口。它已经运行了数周......我知道我上周某个时候convert在这 12 个屏幕窗口之一中执行了 ImageMagick命令......有什么方法可以轻松搜索所有 12 个实例的 Bash 历史记录,而无需关闭它们或运行它们history | grep convert在所有 12 个屏幕中?
Ger*_*ert 19
您可以history -a; history -c在所有窗口中运行以保存历史记录。然后history -r刷新它。
要更永久地解决它,请将其添加到您的.bashrc:
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
Run Code Online (Sandbox Code Playgroud)