history
来源:互联网 发布:淘宝退换货怎么写 编辑:程序博客网 时间:2024/04/29 15:23
查询我们曾经下达过的命令呢?就使用 history 啰!
[root@www ~]# history [n][root@www ~]# history [-c][root@www ~]# history [-raw] histfiles选项与参数:n :数字,意思是『要列出最近的 n 笔命令行表』的意思!-c :将目前的 shell 中的所有 history 内容全部消除-a :将目前新增的 history 命令新增入 histfiles 中,若没有加 histfiles , 则默认写入 ~/.bash_history-r :将 histfiles 的内容读到目前这个 shell 的 history 记忆中;-w :将目前的 history 记忆内容写入 histfiles 中!范例一:列出目前内存内的所有 history 记忆[root@www ~]# history# 前面省略 1017 man bash 1018 ll 1019 history 1020 history# 列出的信息当中,共分两栏,第一栏为该命令在这个 shell 当中的代码,# 另一个则是命令本身的内容喔!至于会秀出几笔命令记录,则与 HISTSIZE 有关!范例二:列出目前最近的 3 笔数据[root@www ~]# history 3 1019 history 1020 history 1021 history 3范例三:立刻将目前的数据写入 histfile 当中[root@www ~]# history -w# 在默认的情况下,会将历史纪录写入 ~/.bash_history 当中![root@www ~]# echo $HISTSIZE1000
0 0
- history
- history
- history
- history
- history
- history
- history
- history
- history
- history
- history
- history !
- history
- history
- History
- history
- history
- history.go(),history.back(),history.forward()
- ftp备份工具推荐,双向备份软件,文件同步软件,u盘备份软件推荐
- Comparable与Comparator的区别
- 活在奉献里
- Redis和Memcache的区别分析
- mongodb操作(概述以及相关的命令)
- history
- Flume NG 简介及配置实战
- 个人开发日志2015-12-15
- RFID扫描APP--source5
- sys
- 蓝桥杯 十六进制转十进制(字符串)
- 电子商务网站专题页策划的6个必杀技
- Arduino - 我偏爱的三块板子( Uno、Nano、Promini)针脚示意图
- linux 目录/sys 解析