Mac osx backup history

How can I back up the osx (lion) terminal command history to a text file on my desktop?

+6
source share
3 answers

you can do this by redirecting the output of the history to a file.

history > history.txt

+15
source

If you are using bash:

~ / .bash_history

else if zsh:

~ / .zsh_history

+3
source

Since you are not really talking about a shell or bash, you can simply use the menu item "Export as text ...". This exports the entire line buffer to a text file.

+2
source

Source: https://habr.com/ru/post/925632/


All Articles