Jump to content

about .bash_history file

Bhagyesh28's Photo
Posted Feb 21 2010 11:03 PM
3909 Views

Hi
Please let me know , my .bash_history file get deleted from my account , but still I am able to work on histroy command ( means it is working )..

Can someone just let me know what is impact if .bash_history file get deleted ..

Thanks

Bhagyesh


Tags:
0 Subscribe


2 Replies

0
  msilver's Photo
Posted Feb 21 2010 11:36 PM

The .bash_history file stores previous commands you entered in the shell, so your system shouldn't cease to function without it. However you won't be able to press the up-arrow and go through the previous commands you've entered previously.

Learning the Bash Shell has some great information about the history file.
0
  JHR's Photo
Posted Feb 22 2010 06:12 AM

For each instance, Bash keeps a local history in memory. This local history is available only to that one instance. When the instance exits, the local history is saved to the .bash_history file and becomes available to instances created subsequently.

Deleting .bash_history does not delete an instance's local history.