User Tools

Site Tools


infrastructure:unix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
infrastructure:unix [2019-07-17 09:43] – mrksinfrastructure:unix [2020-06-11 12:18] (current) – mrks
Line 1: Line 1:
 ====== Unix ====== ====== Unix ======
 +
 +
 +===== Shell =====
 +
 +[[https://stackoverflow.com/questions/8473121/execute-command-without-keeping-it-in-history|Execute command  without keeping it in hostory]]:
 +
 +  * Sometimes shell commands must be kept form history, e.g. when setting secrets to environment variables for configuring applications according to the [[https://12factor.net/config|Twelve-Factor-App]].
 +  * Configure the shell to not record history when starting with a space: ''$ export HISTCONTROL=ignorespace''
 +  * Execute the command with a secret with a leading space: ''$ ⌴export⌴MY_PASSWORD=the-secret''
 +  * Verified in Bash. The command will not be recorded in ''~/.bash_history''.
  
  
infrastructure/unix.1563349382.txt.gz · Last modified: (external edit)