Efficient Linux at the CLI
This week we’re talking to Daniel J. Barrett, author of Efficient Linux at the Command Line as well as many other books. Daniel has a PhD and has been teaching and writing about Linux for more than 30 years (almost 40!). So we invited Dan to join us on the show to talk about efficient ways to use Linux. He teaches us about combining commands, re-running commands, $CDPATH hacks, and more.
Discussion
Sign in or Join to comment or subscribe
Daniel J. Barrett
Boston, MA
Author of “Linux Pocket Guide,” “Efficient Linux at the Command Line,” and other O’Reilly books.
2023-07-06T18:04:18Z ago
Thanks so much for having me on the show! I’d like to make two small corrections where I misspoke:
0:15:36 - When talking about command substitution with backticks, I gave the command:
emacs `grep -wl word`
but grep also needs the names of files to search, so place an asterisk at the end:
emacs `grep -wl word *`
1:07:57 - I said “Type cd slash, and then a hyphen.” I meant: “Type cd SPACE, and then a hyphen.” In other words:
cd -
It’s challenging to speak ad hoc Linux commands out loud. :-)
Jerod Santo
Bennington, Nebraska
Jerod co-hosts The Changelog, crashes JS Party & takes out the trash (his old code) once in awhile.
2023-07-06T18:12:04Z ago
Solid corrections, Daniel. Thanks!
You did great 😎
Jarvis Yang
Minneapolis, MN
2023-07-10T16:19:48Z ago
Awesome show! Directory stack sounds super helpful!
Daniel J. Barrett
Boston, MA
Author of “Linux Pocket Guide,” “Efficient Linux at the Command Line,” and other O’Reilly books.
2023-07-10T17:50:37Z ago
Glad you liked it! The directory stack changed how I navigate forever. I recommend aliasing the pushd and popd commands to shorter names so they’re easier to use. Mine are:
alias gd=pushd
alias pd=popd
Dwayne Bradley
Hayesville, NC
2023-08-15T13:01:54Z ago
@jerodsanto Have you tried integrating fzf into your shell? It makes Ctrl-r even better! If you follow the installation instructions Using git it will prompt you during the install for the key bindings integrations. Not all of the package manager installation methods will do this part for you.
Jerod Santo
Bennington, Nebraska
Jerod co-hosts The Changelog, crashes JS Party & takes out the trash (his old code) once in awhile.
2023-08-15T17:05:41Z ago
Oh nice, I’ve used
fzf
inside editors before, but didn’t realize you could crtl-r with it! Thanks