LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Old

Ignoring lines starting with space, and other patterns in bash_history

Posted 08-25-2013 at 11:18 PM by the dsc (linux-related notes)
Updated 08-25-2013 at 11:22 PM by the dsc

It may be a little bit unsafe to have "rm something" commands in your bash history, if you also have the history easily accessible through up and down keys.

The following line will make bash history ignore "rm" and "shutdown":

Code:
export HISTIGNORE="&:rm *:shutdown *"
I don't know the syntax, but it works.

Some people have add there an expression to make bash's history ignore any line starting with...
Member
Posted in Uncategorized
Views 1163 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 12:46 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration