Searching your command history on macOS terminal

How about using Ctrl+R for searching on the Terminal Utility in Mac for searching on the command history,

dudeOnMac: freddy$ whoami
freddy
(reverse-i-search)`who': whoami

Well for controlling how long the history would be retained that depends on a few shell environment variables, HISTFILESIZE which is nothing but number of lines of history you want to retain. Set a huge value for it in .bash_profile for it to take effect

HISTFILESIZE=10000000 

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)