Problems with the history

Forum rules
Before you post please read how to get help

Problems with the history

Postby aalemann on Thu Jan 24, 2013 2:29 pm


I find the history in the bash quite useful and I wanted to increase its size. Therefore I create a .bashrc file in my home directory (there was no such file in it before), wrote the appropriate commands into it and it worked.
However, when I set the option "erasedups" which should prevent me from getting duplicate entries in my history file, this is not working, "ignoredups" works though.

What am I doing wrong?

Here is my .bashrc:
Code: Select all
echo "   DON'T PANIC   "

alias ll="ls -l"
alias la="ls -a"

# set behaviour of the history
export HISTCONTROL=ignoredups:erasedups
export HISTSIZE=100000
export HISTFILESIZE=100000
shopt -s histappend
PROMPT_COMMAND="history -a"

Yes, I logged out and in after editing/creating my .bashrc.

Last edited by xenopeek on Thu Jan 24, 2013 2:37 pm, edited 1 time in total.
Reason: Moved to Bash section.
Linux Mint 17 Qiana
Linux 3.13.0-24-generic x86_64
Intel(R) Core(TM) i3-2100
Level 1
Level 1
Posts: 21
Joined: Wed Nov 28, 2012 5:57 am

Linux Mint is funded by ads and donations.

Re: Problems with the history

Postby Habitual on Thu Aug 01, 2013 5:55 pm

I've had
Code: Select all
in my .bashrc for years,
What I have noticed is that it only ignores 2 identical commands in a row,


Hope that helps.
If you can't find an answer at Google, you must be typing in Braille.
User avatar
Level 10
Level 10
Posts: 3473
Joined: Sun Nov 21, 2010 8:31 pm
Location: Youngstown, Ohio

Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 1 guest