LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 12-11-2003, 09:12 AM   #1
swmok
Member
 
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)

Thanks.

mok
 
Old 12-11-2003, 09:16 AM   #2
Frustin
Member
 
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, 09:20 AM   #3
BSlack
Member
 
Registered: Nov 2003
Location: Italy: 44 42' N - 12 11' E
Distribution: Slackware, what else?!!
Posts: 63

Rep: Reputation: 15
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.
 
Old 12-11-2003, 09:53 AM   #4
agentforsythe
Member
 
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, 12:11 PM   #5
andrewlkho
Member
 
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, 01:39 PM   #6
Crashed_Again
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:

!456

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


Reply


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 09:06 AM
The program Screen, "delete" key doesn't work TroelsSmit Linux - Newbie 0 10-13-2004 07:55 AM
oops - made a file called "--dereference" - how do I delete it? BrianK Linux - General 2 06-21-2004 08:37 PM
How do you delete a file called "--tape-lengh=1"? I've tried everything... Huddlebum Linux - General 1 01-01-2004 10:11 PM
Question about ".bash_history" yuzuohong Linux - General 2 09-17-2002 06:12 AM


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

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