Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to avoid saving current shell session history

Answer:

It might be happened to your before that you don't want to save the current shell session history, but you don't want to clear all the history by executing "history -c", you can use the following method.

# unset HISTFILE

Logout and type history and you will see last session history was not saved.

  1. How to avoid command being saved to shell history
  2. Search the history of commands you have executed
  3. Prevent go way SSH session killing still running job
  4. How to get the PID in current bash shell script
  5. How do I know if I am running a shell inside another shell?

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>