If you want to see a collection of your previous commands used in Linux, you can always type ‘history’ for a listing of them. You can even search through history by grepping for the command you’re looking for, but then you’d have to copy/paste it into the terminal to run it again. Here’s a great shortcut to help you out!

Let’s say there was a long command you know you typed at some point but don’t remember the exact order of things within the command – or you just don’t feel like typing it all out again.

Use the reverse-i-search (ctrl-r)!

Start out at a command prompt. Hit the ctrl-r combination of keys..


Now, simply start typing anything within the command you’re searching for. Once you see some results, keep hitting ctrl-r to cycle through history until you see the command you want! Hit enter to execute it or hit the left or right arrow key to edit it before you execute it.

If you can’t find what you’re looking for, ctrl-c out of the search.

  • What is your reaction?
  • powered by Verysign
  • like gnulinux.ro
  • unmoved gnulinux.ro
  • amused gnulinux.ro
  • excited gnulinux.ro
  • angry gnulinux.ro
  • sad gnulinux.ro
TENDINTA  |  lprm — cancel print jobs
Mirela                   gnulinux.ro
Zona de mobile
25 articole
In context

  • Comment
  • powered by Verysign

Nici un comentariu inca. Fii primul!