Linux总结之Bash特性
命令历史:
使用命令:history
环境变量:
HISTSIZE:命令历史缓冲区中记录的条数,默认为1000;
HISTFILE:记录当前登录用户在logout时历史命令存放文件;
HISTFILESIZE:命令历史文件记录历史的条数,默认为1000;
操作命令历史:
historydOFFSET删除指..
分类:
系统相关 时间:
2015-09-16 23:35:42
阅读次数:
328
Conquer a New RegionTime Limit:5 Seconds Memory Limit:32768 KBThe wheel of the history rolling forward, our king conquered a new region in a distant c...
分类:
其他好文 时间:
2015-09-16 23:27:15
阅读次数:
274
列出你最常用的10条shellhistory|awk‘{a[$2]++}END{for(iina){printa[i]""i}}‘|sort-rn|headhistory|awk‘{a[$4]++}END{for(iina){printa[$i]""i}}‘|sort-rn|headgrep-v"#".bash_history|awk‘{++a[$1]}END{for(iina)printi,a[i]|"sort-k2-nr"}‘|head网络连接..
分类:
系统相关 时间:
2015-09-15 14:50:52
阅读次数:
222
10、history可以查看命令历史记录,每一条命令前面都会有一个序列号标示。10.1.1命令语法:history[选项]10.1.2选项参数history命令选项参数含义选项选项含义-c清除命令历史记录-w让bash将历史命令立即从内存写到.bash_history文件-a将目前新增的history历史命令写入.bash_hist..
分类:
系统相关 时间:
2015-09-14 16:51:31
阅读次数:
200
linux shell命令一般附带很多参数,如果你现在想运行一个很久之前用过的命令,但当时用的参数怎么也技艺不起来了,怎么办?如果用上箭头向前翻动会累死驴的吆!万能的linux真是太方便了,一行命令搞定: $history...
分类:
系统相关 时间:
2015-09-13 10:38:17
阅读次数:
224
上午:Linux基本命令历史记录管理:命令:history-c,清除历史记录,然后在删除家目录下的.bash_history。在家目录下输入命令:ls-a,显示出隐藏文件,找到.bash_history,并且删除。波形符“~”:代表家目录。命令编辑技巧:Ctrl+a,移动光标到行首Ctrl+e,移动光标到行尾Ctrl..
分类:
其他好文 时间:
2015-09-12 20:29:14
阅读次数:
213
摘要运维同学们经常会用history命令来查看命令的历史记录,有时候是为了查找”犯罪证据“,但因为history命令输出默认只有ID和command,查找的同学还想知道命令对应的时间,有没有办法让时间也显示出来呢?办法是有的。本文主要讲讲相关的配置。正文以root用户登录服务器,在/e..
分类:
系统相关 时间:
2015-09-12 01:05:58
阅读次数:
363
Linux中的历史命令一般保存在用户/root/.bash_history history 选项 历史命令保存文件夹 选项 -c:清空历史命令 -w :把缓存中的历史命令写入历史命令保存文件/root/.bash_history 在.bash_history中看到的命令和用history命令看到的内...
分类:
系统相关 时间:
2015-09-08 12:23:42
阅读次数:
210
history.go(0)location.reload()location=locationlocation.assign(location)document.execCommand('Refresh')window.navigate(location)location.replace(locat...
分类:
Web程序 时间:
2015-09-08 00:24:05
阅读次数:
140
history.get方法中的 history 参数默认值为 3(int类型): 参数history的数值需要根据 zabbix 设定的去设置,否则返回的数据会是空列表: value?=?zapi.history.get({"output":"extend","history":3,"itemids"...
分类:
Windows程序 时间:
2015-09-07 18:09:11
阅读次数:
1147