Entry
Linux: Command: History: Operation: Store: File: In which file is the history stored? [history]
Sep 19th, 2003 08:55
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 19 September 2003 - 05:51 pm ------------------
Linux: Command: History: Operation: Store: File: In which file is the
history stored? [history]
The history is stored in the hidden file (as indicated by the dot '.'
in front):
.bash_history
---
To see this file, if you are the root:
Steps: Overview:
1. -Login as root
1. Type the command
su
2. Supply your root password
2. -Change to the home directory of the 'root'
cd /root
3. -View all the files in that directory
ls -la
or also:
ls -la | more
4. -Possibly edit this file, using your favorite
text editor:
emacs .bash_history
or
vi .bash_history
---
---
To see this file, if you are another user:
Steps: Overview:
1. -Change to your home directory
cd /home/<your username>
e.g.
cd /home/john
2. -View all the files in that directory
ls -la
or also:
ls -la | more
3. -Possibly edit this file, using your favorite
text editor:
emacs .bash_history
or
vi .bash_history
---
---
To get more information, type the command:
man history
----------------------------------------------------------------------