标签:Ubuntu20.04 修改 bashrc HISTSIZE 条数 lesspipe bash history
目录Ubuntu20.04修改history记录条数
1.修改当前用户目录下.bashrc
文件第16行HISTSIZE
vim ~/.bashrc
1 # ~/.bashrc: executed by bash(1) for non-login shells.
2 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
3 # for examples
4
5 # If not running interactively, don't do anything
6 [ -z "$PS1" ] && return
7
8 # don't put duplicate lines in the history. See bash(1) for more options
9 # ... or force ignoredups and ignorespace
10 HISTCONTROL=ignoredups:ignorespace
11
12 # append to the history file, don't overwrite it
13 shopt -s histappend
14
15 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1),修改为10000条
16 HISTSIZE=10000
17 HISTFILESIZE=2000
18
19 # check the window size after each command and, if necessary,
20 # update the values of LINES and COLUMNS.
21 shopt -s checkwinsize
22
23 # make less more friendly for non-text input files, see lesspipe(1)
24 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
25
26 # set variable identifying the chroot you work in (used in the prompt below)
27 if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
:set nu
2.重新初始化修改后的~/.bashrc
source ~/.bashrc
3.修改成功
[root@master01 ~]# echo $HISTSIZE
10000
标签:Ubuntu20.04,修改,bashrc,HISTSIZE,条数,lesspipe,bash,history 来源: https://www.cnblogs.com/cxupup/p/15866518.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。