Profile cover photo
Profile photo
Allan Medeiros de Azevedo
5,300 followers -
1 + 1 = 10
1 + 1 = 10

5,300 followers
About
Posts

Post has attachment
Add a comment...

Post has attachment

Post has shared content
Starting a command with one more more spaces prevents it from going into the bash or zsh history.

So if you have to enter something on the commandline that contains secrets as part of the commandline, start the line with a space.

Note that the secret probably still is showing in "ps auxwww" output.

This works, because of the HISTCONTROL environment variable: Setting it to "ignorespace" causes this behavior. "ignoredups" causes lines matching previous history entries not to be saved. If you set "erasedups" instead, the old entry is being deleted and the recent occurence is being saved.

(Also shown: HISTTIMEFORMAT, so you get a dated history)

$ env | grep HIST
HISTCONTROL=ignoredups:ignorespace
HISTTIMEFORMAT=%Y-%m-%d %H:%M:%S

/cc +nixCraft This is old, but apparently not well known.
Photo
Add a comment...

Post has shared content
Help is only 140 million miles away. Watch the exclusive new trailer for The Martian, in theaters October 2. #BringHimHome
Add a comment...

Post has attachment
Bravo!
Add a comment...

Post has shared content
Think this is what they do all day? From the humans behind Despicable Me, watch the trailer for The Secret Life of Pets – in theaters Summer 2016!
Add a comment...

Post has shared content
Add a comment...

Post has shared content
Add a comment...

Post has attachment
Solar eclipse from above the clouds of the Faroe Islands
Add a comment...
Wait while more posts are being loaded