linux history

1. history作用

linux的history命令的作用是,记录执行过的命令。

用法:

history [n] n为数字,列出最近的n条命令

-c 将目前shell中的所有history命令消除

history [-raw] histfiles

-a 将目前新增的命令写入histfiles, 默认写入~/.bash_history

-r 将histfiles内容读入到目前shell的history记忆中

-w 将目前history记忆的内容写入到histfiles

  1. shell > history

  2. 34 14-10-28 16:19:24 ll

展示3行

  1. shell > history 3

  2. 1033 14-11-02 16:10:46 history |more

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容