Modern Unix tools
This week we’re talking with Nick Janetakis about modern unix tools, and the various commands, tooling, and ways we use the commmand line. Do you Bash or Zsh? Do you use cat
or bat
? What about man
vs tldr
? Today’s show is a deep dive into unix tools you know and love, or should know and maybe love.
Discussion
Sign in or Join to comment or subscribe
Nick Janetakis
2021-07-31T10:25:05Z ago
Thanks for having me, that was fun!
Jerod Santo
Omaha, Nebraska
Jerod co-hosts The Changelog, crashes JS Party, and takes out the trash (his old code) once in awhile.
2021-08-02T13:10:01Z ago
Thanks for joining us! We’ll have to think of another excuse to have you back on sometime soon 😁
2021-07-31T22:33:38Z ago
I am in serious need of the Arnold file extraction meme, but my searches turned up empty
Nick Janetakis
2021-07-31T23:02:03Z ago
https://twitter.com/nickjanetakis/status/1295698617068552194
2021-07-31T23:44:57Z ago
That is awesome, thanks.
Mohamed
Ruby Developer aka Joy Developer
2021-08-02T08:37:44Z ago
I also use
ll
. When I connect though SSH the first thing is to typell
to see if they have this alias or not.XD
Alex R
https://elrey.casa/me
2021-08-02T13:02:41Z ago
Haven’t finished listening yet, but got to the part where you were talking about your command history and I was curious about my commands. Since you were more curious about the actual individual commands themselves ( not the whole command that you typed, but the binary you launched ( sed, cat, vim, etc.. )). You can actually just run this command, which should work on either zsh or bash ( so not to leave adam out ( I actually oh-my-zsh as my default as well 🙃, but prefer bash for scripting ) ).
history | awk '{print $2}' | sort | uniq -c | sort -nr | head
The only real difference is the
awk '{print $2}'
, which will print out the second “word” ( essentially not whitespace, but can be just numbers ) it identifies ( which the second “word” is the executable ).By the way, you don’t need the
-n 10
for the head command you read off during the podcast, because by default head returns the first 10 🙂here are my results from the command above:
I didn’t realize how many things I sudo 😅 and as you can tell I am pretty much never staying on my laptop ( containers ( podman or docker ( which is just an alias to podman, but me copy pasting commands ) ), vagrant boxes, or ssh ) 😂. That also doesn’t count how many times I use the x2go ( pretty good YT video explaining it ) to essentially ssh over to another server, which I do every day 😅 ( you can learn more about my normal setup from here if you are interested ( essentially I x2go over to any other system from my lapt, which has the PCIe passthrough configured 2 monitors ) ).
also, instead of typing exit you can actually just hit
Ctrl + d
and it will exit your terminal instead of you having to type it 😁 you can learn some other keyboard shortcuts by watching this YT video that I created.Alex R
https://elrey.casa/me
2021-08-02T13:04:11Z ago
Just heard Nick’s comment saying the
Ctrl + d
😅Mohamed
Ruby Developer aka Joy Developer
2021-08-02T13:30:53Z ago
Here mine
Jerod Santo
Omaha, Nebraska
Jerod co-hosts The Changelog, crashes JS Party, and takes out the trash (his old code) once in awhile.
2021-08-02T13:14:56Z ago
Yeah, that command we used on the show was literally the first hit when searching something like ‘bash show top used commands’, so it got very little scrutiny (like, none) before we used it on the show.
I ran the command you provided above:
As you can see, I keep a looooong history of commands. I’ve known about
ctrl + d
for some time, but you should see how fast I can typeexit
after all these years 😆jonasbn
Copenhagen, Denmark
Computer programmer, runner, LEGO builder, powernapper and father of 2 boys all squeezed in the few hours available.
2021-08-10T06:32:58Z ago
You should checkout HISTIGNORE environment variable, it can be used to slim down your history by eliminating trivial entries
Perhaps
exit
could be added for Jerod.REF:
Jerod Santo
Omaha, Nebraska
Jerod co-hosts The Changelog, crashes JS Party, and takes out the trash (his old code) once in awhile.
2021-08-10T14:44:30Z ago
VERY cool @jonasbn I did not know about this! Will check out yer blog post 👀
Mohamed
Ruby Developer aka Joy Developer
2021-08-02T13:14:43Z ago
I’m going to try
tldr
. The first problem that I see with it is the name, it doesn’t stick to my head (non english speaker).If you are going to say “use alias”, let me stop you there, because
alias
es doesn’t fix everything, because every couple of years I totally reset my computer, and install the software that I use, and if I don’t remember the name if this command, I will never install it.Jerod Santo
Omaha, Nebraska
Jerod co-hosts The Changelog, crashes JS Party, and takes out the trash (his old code) once in awhile.
2021-08-10T14:43:28Z ago
If you think of
tldr
asToo Long; Didn't Read
and then think ofman
pages as too long to read the entire thing… perhaps it’ll stick a bit better?