Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

Output of history command in iTerm

Writer Matthew Martinez

I am using 'iterm' as my terminal at macosx. But I don't see all my command I type when I do 'history' and I don't see my previous command (copy and paste) using the UP arrow key?

Is there a way to fix it?

3

2 Answers

Check you home dir in iTerm.

$ cd ~
$ ls -la | grep .bash_history

If the above command found the file you can do the following command

$ cat .bash_history

This will show your history. Not in the exact same format as 'history' but it will do I think. Or you can search within your history with the shortcut CTRL + r. It will show something as (reverse-i-search). Type your command you did earlier and it will return a result.

Note: Some terminals have a different shell. For instance zsh. If that's the case you need to search .zsh_history

2

I was having the same problem for a long time. I tried everything but Magic, not being myself a magician. Finally, I said to myself that it could last forever because having my history in the Toolbelt is a time saving, and I began looking systematically everywhere, even in Magic.Preferences > Magic > Save copy/paste and command history to diskwas the solution I believe you are looking for.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy