Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
How to avoid logging specific commands in the history ?
Answer

# export HISTIGNORE="pwd:ls:ls -ltr:"

# pwd # ls # ls -ltr

# service httpd stop

# history | tail -3 79 export HISTIGNORE="pwd:ls:ls -ltr:" 80 service httpd stop 81 history

[Note that history did not record pwd, ls and ls -ltr]


Question
How to avoid logging specific commands in the history ?
Answer
?

Question
How to avoid logging specific commands in the history ?
Answer

# export HISTIGNORE="pwd:ls:ls -ltr:"

# pwd # ls # ls -ltr

# service httpd stop

# history | tail -3 79 export HISTIGNORE="pwd:ls:ls -ltr:" 80 service httpd stop 81 history

[Note that history did not record pwd, ls and ls -ltr]

If you want to change selection, open document below and click on "Move attachment"

15 Examples To Master Linux Command Line History
to ignore from the history. Please note that adding ls to the HISTIGNORE ignores only ls and not ls -l. So, you have to provide the exact command that you would like to ignore from the history. <span># export HISTIGNORE="pwd:ls:ls -ltr:" # pwd # ls # ls -ltr # service httpd stop # history | tail -3 79 export HISTIGNORE="pwd:ls:ls -ltr:" 80 service httpd stop 81 history [Note that history did not record pwd, ls and ls -ltr] Recommended Reading [imagelink] Bash 101 Hacks , by Ramesh Natarajan. I spend most of my time on Linux environment. So, naturally I’m a huge fan of Bash command line and shell scripting

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.