True, but I find the man pages not easy and quick to parse.
True, but I find the man pages not easy and quick to parse.
I recently found https://tldr.sh/ and found it more convenient. I ended up writing myself a vscode extension to have a quick lookup at my fingertips, since I am at least 60% of the time looking at a terminal in vscode
Use `/` and search for the things of interest (keywords, arguments, options, etc...). Use n/N to quickly jump forward/back.
However, I already have this in my muscle memory: find <where> -name '<what>' -type f(file)/d(directory)
Works in 90% of situations when searching for some file in terminal, ie: find / -name 'stuff*'
The rest of the time is spent figuring out exec/xargs. :)
And once you master that, swap xargs for GNU parallel. I bet your machine has a ton of cores, don't let then sit idly. ;)
But yeah, you're right.
man <command> | col -b | grep "search_string"
gm () { man $1 | col -b | grep --color=always "$2" }
I also have something similar for grepping a command's help
gh () { $1 --help | grep --color=always $2 }
I usually try gh(grep help) and if I don't get what I'm looking for, I run gm(grep man).
It appears that I can also use tldr