How do I exclude strings from .bash_history?

Where Penguins and Daemons chill together in the warmth of the Sun.

Moderators: SecretSquirrel, notfred

How do I exclude strings from .bash_history?

Postposted on Sat Dec 01, 2007 10:56 pm

I could not find a way to do this after searching online-I need it to avoid logging passwd's when I initialize smbclient at boot.
rouslan
Gerbil
 
Posts: 86
Joined: Tue Oct 24, 2006 9:04 pm

Postposted on Sat Dec 01, 2007 11:20 pm

I believe what you're looking for is the HISTIGNORE environment variable.

Or if you don't want the bash history ever saved to disk, you can unset HISTFILE at the end of you bash config file.
Steel
Global Moderator
Gold subscriber
 
 
Posts: 2326
Joined: Wed Dec 26, 2001 7:00 pm

Postposted on Sun Dec 02, 2007 1:08 am

Just a FYI... if you've got a reasonably modern kernel (with CIFS support), you should be able to mount the remote file system via your fstab instead, providing the password via a credentials file that is only accessible by root. I don't know exactly what you're trying to do, but in general that's a better all-around way of accessing the server, since it looks just like any other mounted filesystem.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37668
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer


Return to Linux, Unix, and Assorted Madness

Who is online

Users browsing this forum: No registered users and 2 guests