Skip to content

Instantly share code, notes, and snippets.

@amypellegrini
Created August 10, 2019 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amypellegrini/86046c96cff4a2287a0c0466fbec9a51 to your computer and use it in GitHub Desktop.
Save amypellegrini/86046c96cff4a2287a0c0466fbec9a51 to your computer and use it in GitHub Desktop.
Save your bash history for learning purposes

Save your bash history for learning purposes

Very often I find myself trying to learn something new which requires from me to run easy-to-forget console/terminal commands.

Sometimes I have to trial-and-error using different commands until I finally get it, which means I may have some difficulty trying to remember what I did next time I want to do it again.

To avoid this I find very useful to save my command line history so I can replay back everything I did step by step.

To do this I just run:

history > history.txt

The above command will save your history to a text file called history.txt which you can check again later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment