Bash trick: Reverse-i-search

The bash reverse-i-search is very usefull when needing to lookup for a command in the history.

Press Ctrl – R and you get this: (reverse-i-search)`’:

Type parts of the command you need to find and bash will give you the related command.

I typed less and file in the reverse-i-search:

$ [Ctrl - R]
(reverse-i-search)`less': ls -a | grep "^." | less

$ [Ctrl - R]
(reverse-i-search)`file': file /usr/share/man/man1/deja-dup-preferences.1.gz

This is a bash trick. To read the other bash tricks, click here.

Tagged with: , , , , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

Your email address will not be published. Required fields are marked *




Subscribe to get the latest Linux news and how to guides directly on your e-mail!