LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Editing stored Terminal commands (http://www.linuxquestions.org/questions/linux-software-2/editing-stored-terminal-commands-134284/)

ShaanAli 01-13-2004 08:08 AM

Editing stored Terminal commands
 
Hi,
I have very small query being a newbie in linux world. I have Redhat 9 with Gnome.

I can switch to terminal (shell) using Ctrl_Alt+(F1-F4). or using terminal in Gnome. I can type any command over there which can bring me result or not. I can nevigate my old command, even after restarting system using arrow keys. It means, my all these commands are being stored in some File.

I just want path to that file and the controller of that file so that i can control the number of commands. :p

regards,
Shahnaz ali.

trickykid 01-13-2004 08:55 AM

/home/<user>/.bash_history

Hertattack 01-13-2004 08:55 AM

You are probably using bash as a shell so "man bash" should help you to get to know a lot about the shell, but here are some pointers:

In your home dir there is a hidden file named: .bash_history that file contains your command history.

Setting the enviroment variable HISTFILESIZE=<size> should truncate the file if it gets too big.

Again, this information is found in the bash manpage. You might also want to take a look at /etc/profile, /etc/bashrc, ~/.bashrc, ~/.bash_profile

I hope this will help you,

Marcel


All times are GMT -5. The time now is 06:08 PM.