bash doesn't keep history
Posted
by
yohbs
on Ask Ubuntu
See other posts from Ask Ubuntu
or by yohbs
Published on 2012-10-24T15:13:13Z
Indexed on
2012/10/24
17:14 UTC
Read the original article
Hit count: 875
I run Ubuntu 12.04, and for some reason bash does not keep my command history. the ~/.bash_history
file contains only 3 commands that I typed a few months ago.
How can I fix this?
EDIT:
here's the relevant content of my .bashrc
:
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
© Ask Ubuntu or respective owner