history | grep {some part of command}
Much more useful for going further back, even without grep.
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
sudo
in Windows.Please report posts and comments that break these rules!
Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.
history | grep {some part of command}
Much more useful for going further back, even without grep.
As some one who SSH's from a phone to run Docker containers and will be moving the container volumes to a different location, I thank you for this lovely command.
Easier to type history
then !xx
where xx is the number of record in history.
I feel this in my soul. Or when you realize you're hitting up up up up to find something trivial like ls
and it would have been more efficient to just type ls
. LOL.
I try to avoid the terminal as much as I humanly can because of ergonomic issues like this.
Ctrl-R