为什么Bash历史记录中的某些行变为"*"? [英] Why some lines in Bash history become "*"?

查看:68
本文介绍了为什么Bash历史记录中的某些行变为"*"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

执行反向搜索后,为什么Bash历史记录中的某些行(如第509和512行以下)变成"*"?

Why some lines (as below line 509 and 512 ) in Bash history become "*", after I execute reverse-i-search?

507  stty -ixon
508  history
509* 
510  echo 10
511  echo 20
512* 
513  ls
514  history
515  stty ixon
516  stty -a
517  stty -h
518  man stty
519  history

推荐答案

星号表示该行已被修改.参见man history.

The star means the line has been modified. See man history.

演示:

在终端提示符下,使用向上箭头键显示上一个命令. 使用退格键删除命令. 使用向下箭头键返回到最后一个提示并输入 历史 修改后的行现在应该在历史记录中显示为行号,后跟一个星号.

From the terminal prompt use the up-arrow key to display a previous command. Delete the command with the backspace key. Use the down-arrow key to return to the last prompt and enter history The modified line should now be displayed in the history as a line number followed by a star.

这篇关于为什么Bash历史记录中的某些行变为"*"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆