loading...

re: 10 simple Linux tips which save 50% of my time in the command line VIEW POST

FULL DISCUSSION
 

Technically these are not "Linux commands", but builtins/features of the shell you're using. They'll work on other OS that run the same shells too and might not work in different shells even on Linux:

$ !!
/bin/ksh: !!: not found
$ pushd
ksh: pushd: not found
$ 
Enter fullscreen mode Exit fullscreen mode

Even switching Bash from emacs to vi mode has an effect on some of the things you mention here, i.e. CTRL-R for history:

$ bindkey|grep hist
"^N" down-line-or-history
"^O" accept-line-and-down-history
"^P" up-line-or-history
"^R" history-incremental-search-forward
"^S" history-incremental-search-forward
[snip]


$ set -o vi
$ bindkey|grep hist
"^[OA" up-line-or-history
"^[OB" down-line-or-history
"^[[A" up-line-or-history
"^[[B" down-line-or-history

Enter fullscreen mode Exit fullscreen mode

That's why the drawings by Julia Evans you're using are calling them "bash tricks". Granted, a lot of them will work across shells since they have the same builtins, but IMHO the distinction matters.

 

Yes, technically you are correct, most of them are bash built-in. You also mentioned a couple of good points which I didn't know before, thx for adding value.

 

Only I do ”set -o vi” in my .bashrc and use ”cntl+r” all the time.

 

Cool. Nobody is stopping you or your distribution from customizing your readline config, but on a lot of systems it won’t work out of the box.

 

the distinction matters

Bah! He's writing a blog article, not an ISO spec. The point of the title is that it's discoverable, not that it builds a precise reference taxonomy. Consider the neebs like me in the target audience. "What Linux command do I have to run?" is a common question I ask.

However, the distinction is correct.

Code of Conduct Report abuse