灯火互联
管理员
管理员
  • 注册日期2011-07-27
  • 发帖数41778
  • QQ
  • 火币41290枚
  • 粉丝1086
  • 关注100
  • 终身成就奖
  • 最爱沙发
  • 忠实会员
  • 灌水天才奖
  • 贴图大师奖
  • 原创先锋奖
  • 特殊贡献奖
  • 宣传大使奖
  • 优秀斑竹奖
  • 社区明星
阅读:2134回复:0

一天一条linux命令之history

楼主#
更多 发布于:2012-08-27 15:06



一天一条linux命令之history

history命令的功能是显示使用过的命令,并为其编号。

history n 显示最近使用过的n条命令。  www.atcpu.com  

history -c 将当前shell中历史清空。

history -d 801 删除编号为801的命令。

history -a 追加最新一条命令到历史文件中。

history -n 显示还没有从历史文件中读取的历史记录。

history -r 将历史文件中的记录作为当前shell的历史记录。

history -w 将当前记录写入历史文件中,覆盖原内容。

-p Perform history substitution on the following args and
display the result on the standard output. Does not
store the results in the history list. Each arg must be
quoted to disable normal history expansion.  www.atcpu.com  

-s Store the args in the history list as a single entry.
The last command in the history list is removed before
the args are added.

!! 执行上一条命令。
!n 执行第n条命令。
!cd 执行最近一条以cd开头的命令。
!与后面都没有空格。





喜欢0 评分0
游客

返回顶部