Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-11-2003, 10:12 AM   #1
Registered: Jul 2003
Posts: 152

Rep: Reputation: 30
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)


Old 12-11-2003, 10:16 AM   #2
Registered: May 2002
Location: Essex, UK
Distribution: Debian, Redhat, AIX 5L
Posts: 512

Rep: Reputation: 30
set the envirment variable HISTORY to 0 in /etc/profile.
Old 12-11-2003, 10:20 AM   #3
Registered: Nov 2003
Location: Italy: 44 42' N - 12 11' E
Distribution: Slackware, what else?!!
Posts: 63

Rep: Reputation: 15
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.
Old 12-11-2003, 10:53 AM   #4
Registered: Aug 2003
Location: Nottingham, UK
Distribution: Xandros, Debian, Solaris
Posts: 31

Rep: Reputation: 15
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
Old 12-11-2003, 01:11 PM   #5
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
Hey, I never knew about the "history" command..that's a kinda cool utility. thanks, agentforsythe!
Old 12-11-2003, 02:39 PM   #6
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
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:


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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Turn off "bash_history" swmok Linux - Software 8 09-23-2012 10:06 AM
The program Screen, "delete" key doesn't work TroelsSmit Linux - Newbie 0 10-13-2004 08:55 AM
oops - made a file called "--dereference" - how do I delete it? BrianK Linux - General 2 06-21-2004 09:37 PM
How do you delete a file called "--tape-lengh=1"? I've tried everything... Huddlebum Linux - General 1 01-01-2004 11:11 PM
Question about ".bash_history" yuzuohong Linux - General 2 09-17-2002 07:12 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration