Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

It would be great to access all my commands run in terminal on OSX so I can review and use as a running reminder sheet.

I'm using Reverse-I-Search prompt and have updated my .bash_profile to store all of my history as mentioned here on Mactoids.

  1. Start Terminal
  2. Navigate to the Home folder by entering:

cd ~/

  1. Create .bash_profile by entering:

touch .bash_profile

  1. Now, either edit .bash_profile in your favorite text editor or type this in the Terminal window to automatically open the file in the default TextEdit:

open -e .bash_profile

  1. Lastly, add this to the .bash_profile file:

HISTFILESIZE=1000000000 HISTSIZE=1000000

  1. Save and exit

Any ideas how I could access as to output the terminal command history in OSX?

share|improve this question

migrated from Jul 10 '11 at 23:11

This question came from our site for professional and enthusiast programmers.

I presume you've read man bash, so you should know that the history is stored in the file ~/.bash_history. What else do you need to know, can you clarify? – nobody Jul 10 '11 at 21:46
Yes, because I new the 'man' command existed then read the manual found the answer and decided to ask the question above just for the fun of it. Thanks fideli for quick, clear and unpretentious answer. – Cameron McGrane Jul 11 '11 at 1:15

1 Answer 1

up vote 5 down vote accepted

All of your history is stored in ~/.bash_history, where both reverse-i-search and the up/down keys use. That file is regularly pruned, but if you followed the guide in your link, the .bash_history file will practically never be pruned.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.