We know that 7z can be used as an encryption method and that up-arrow key is used to see what commands and what tasks had done, so it can be use to reveal the password because in this case passwords are not hidden. Like:
7z a -pMy_PassWord IT_Mag.7z IT_Mag
So if hackers or anyone can access my laptop they can open terminal and use up-arrow key to see passwords of my files.
Please help me solve this problem!


space command

  # command   
  # press space bar then command 

Execute a command without saving it in the history

Prepending one or more spaces to your command won't be saved in history.

Useful for passwords on the commandline.

Tested on BASH.

cat | bash

Execute your commands and avoid history records

Sometimes you don't want to leave history, because of passwords.

cat | bash
echo password

Ctrl + C to exit

Tested on BASH.


If you're not concerned about keeping the session active, this may work:

kill -9 $$

It will kill the current session instead of logging-out, which [theoretically] means your history will not be saved.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.