FG

Execute a terminal command without saving it to .bash_history on OS X?

Fresh3 days ago
Mar 15, 20268076 views
Confidence Score0%
0%

Problem

This site says that on Linux you can add a before a terminal command to keep it out of . This does not seem to work for Mac OS X. Does anyone know of a way to execute a single command on the Terminal without saving it to history? I don't want to clear the history.

Error Output

space

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Execute a terminal command without saving it to .bash_history on OS X?

Low Risk

Add the following line to ~/.bashrc Then to refresh the settings This should enable that feature in bash. If it doesn't work, you might have to add it to ~/.bash_profile instead of ~/.bashrc since OS X loads them a bit differently than linux I think.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment