1

Always when I turn on my Fedora 18, my history command disappear.

How can I recovery all my history since I installed my OS?

In my ./bash_history show olny the command of the day when I turn off my PC disappear all my past command in ./bash_history.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Vitor Mazuco
  • 1,014
  • 6
  • 19
  • 39

1 Answers1

4

Unfortunately you cannot recover it, sorry.

For unlimited Bash history consult this link, and if you stall somewhere, edit your question in detail to help you out.

In short, if they do not already exist, you should add two lines to your .bashrc:

HISTSIZE=
HISTFILESIZE=

If your username is vitor, under normal configuration the full path of .bashrc will be /home/vitor/.bashrc.

Konstantinos
  • 1,075
  • 8
  • 13
  • Ok, but how can I make this? Disappear all the history command and in ./bash_history? And how can I stop the history disappear? – Vitor Mazuco May 27 '14 at 18:32
  • In my basrc is # .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi – Vitor Mazuco May 27 '14 at 18:45
  • Since I do not see any `HISTSIZE=` or `HISTFILESIZE=` lines, you can add those two lines at the end of the file. Do not add anything after the equal sign (=). For verification, start a new shell and type a few commands. Watch how `.bash_history` changes appending the command you just wrote. You should be able to keep the history after reboot. Try it and let us know. ;) – Konstantinos May 27 '14 at 18:50