I
I
Ivan Ivanov2021-05-08 11:55:53
Debian
Ivan Ivanov, 2021-05-08 11:55:53

Why didn't history increase in debian?

Made

cat <<EOT >> ~/.bashrc
export HISTSIZE=-1
export HISTFILESIZE=-1
export HISTCONTROL=ignoreboth:erasedups
PROMPT_COMMAND='history -a'
export HISTIGNORE='ls:ps:history*'
export HISTTIMEFORMAT='%d.%m.%Y %H:%M:%S: '
EOT
source ~/.bashrc

Relogined to the terminal, the last 500 commands are still shown. Why?
bashrc content
# ~/.bashrc: executed by bash(1) for non-login shells.

# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022

# You may uncomment the following lines if you want `ls' to be colorized:
#export LS_OPTIONS='--color=auto'
#eval "`dircolors`"
#alias ls='ls $LS_OPTIONS'
#alias ll='ls $LS_OPTIONS -l'
#alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'

#PS1='${debian_chroot:+($debian_chroot)}\[\e[1;31m\]\u\[\e[1;33m\]@\[\e[1;36m\]\h \[\e[1;33m\]\w \[\e[1;35m\]\$ \[\e[0m\]'
export HISTSIZE=-1
export HISTFILESIZE=-1
export HISTCONTROL=ignoreboth:erasedups
PROMPT_COMMAND='history -a'
export HISTIGNORE='ls:ps:history*'
export HISTTIMEFORMAT='%d.%m.%Y %H:%M:%S: '


Tried also
export HISTSIZE=999999999
export HISTFILESIZE=999999999

- did not help.

By the way, the date and time of command execution are also not shown after restarting the terminal. But they show up aftersource ~/.bashrc

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2021-05-08
@saboteur_kiev

Check other files like .bash_profile, .bash_login, what if it overrides somewhere?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question