2

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!

3 Answers 3

3

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.

0
0
cat | bash

Execute your commands and avoid history records

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

cat | bash
echo password
password

Ctrl + C to exit

Tested on BASH.

0

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.

Help

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .