开发者社区> 问答> 正文

Linux基本命令中命令 history各项命令相关代码有哪些?

已解决

Linux基本命令中命令 history各项命令相关代码有哪些?

展开
收起
去校区学技术 2022-04-02 13:11:57 398 0
1 条回答
写回答
取消 提交回答
  • 推荐回答
    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
    
    2022-04-02 14:33:33
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载