Linux基本命令中命令 history各项命令相关代码有哪些?
Display the history list with line numbers,prefixing each modifiedentry with a`*'. An argument of N lists only the last N entries.
-c clear the history list by deleting all of th
-d offset delete the history entry at offset OFFSET.
-a append history lines from this session to the history file
-n read all history lines not already read from the history file
-r read the history file and append the contents to the history
List
-w write the current history to the history file and append them to the history iist
-p perform history expansion on each ARG and display the result without 'storing it in the history list
-s append the ARGs to the history list as a single entry
If FILENAMEis given,it is used as the history file. otherwise,if $HISTFILE has a value,that is used,else ~/.bash_history.
If the $HISTTIMEFORMAT variable is set and not nul1, its value is usedas a format string for strftime(3) to print the time stamp associated
with each displayed history entry.No time stamps are printed otherwise.Exit status :
Returns success unless an invalid option is given or an error occurs.
[root@centos7 ~]#cat .bash_history
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。