shell

Don’t record a command in history

In bash (at least), you can avoid your command to be recorded in the history: just start the line with a space.

Example

# recorded
echo "this will be recorded"
 
# not recorded
 echo "this won't be recorded"
 rm -rf /var/log/nginx