Last Updated: February 25, 2016
·
797
· nvaken

Search your command history

This is a simple command I use daily. I guess this is a really simple shell tip, but for the beginners that are not aware of this one it could be a real time saver.

There are sometimes a few commands I only partially remember, to search these, like for example reconfiguring a PLESK vhost:

/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=<DOMAIN>

I always remember the reconfigure bit, so I just simply type:

history | grep reconfig

Which simply prints out all the commands that use the string "reconfig".

I know, really simple, but still, effective.