LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   delete ".bash_history" (https://www.linuxquestions.org/questions/linux-software-2/delete-bash_history-124904/)

swmok 12-11-2003 09:12 AM

delete ".bash_history"
 
Hi All:

I want to delete all the files ".bash*" inside my folder.
I've already delete ".bashrc" and ".bash_profile".

However, everytime I logout. The system will update a ".bash_history"
in my folder.

How can I turn off this feature? (remember! my .bashrc and .bash_profile are not in the folder)

Thanks.

mok

Frustin 12-11-2003 09:16 AM

set the envirment variable HISTORY to 0 in /etc/profile.

BSlack 12-11-2003 09:20 AM

Quote:

The system will update a ".bash_history"
It is bash itself that update .bash_history probably because you are using bash as default shell. This is normal behavior. Every time you terminate a bash shell session the .bash_history is updated. You can "redirect" the history to /dev/null setting the environment variable HISTFILE to /dev/null.

agentforsythe 12-11-2003 09:53 AM

why exactly do you want to turn off this very useful feature?

e.g., forgot what command line you used last time you burned a cd?
history | grep cdrecord

andrewlkho 12-11-2003 12:11 PM

Hey, I never knew about the "history" command..that's a kinda cool utility. thanks, agentforsythe!

Crashed_Again 12-11-2003 01:39 PM

yeah that command is good. If you run 'history' you see a list of commands with numbers next to them. If you want to run the command with the number 456 then you can just do:

!456

and it will run that command. Another great bash utility.


All times are GMT -5. The time now is 08:48 AM.