Output of history command in iTerm

Solution 1:

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