Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Tech198

Cancelled
Original poster
Mar 21, 2011
15,915
2,152
Probably not the best route, but it works just as good without scripts, open Terminal window and type:

Code:
defaults write com.apple.finder AppleShowAllFiles TRUE

"force quit" Finder.

in %home folder% trash .bash_history file and delete contents of .bash_history folder and lock (Get info, and tick "Locked")

- In Terminal, type history -c (probably not required)
- reverse the showing of files as above, but use FALSE instead, and re-launch Finder again.

All history will never be kept across any session of Terminal.:)

Although the .bash_history fill will still be created, the fact .bash_folder cannot be written to because its locked, your good to go

You'll get an error every time Terminal opens mkdir... but that is nothing to worry about.

If u wish to re-enable history, just show all files again and unlock the folder.
 
Last edited:
You can just set up a configuration in your ".bash_profile" file. Whatever will be put in there will be executed/set whenever you start a new shell session. For example, adding:
Code:
set +o history

disables the history for the lifecycle of the session. Alternatively, you can also unset the history file:
Code:
unset HISTFILE
 
  • Like
Reactions: Valdna
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.