Skip to content

Instantly share code, notes, and snippets.

@amitozdeol
Created August 24, 2018 17:16
Show Gist options
  • Save amitozdeol/b4c82494112883154c583ab5ff8a65b9 to your computer and use it in GitHub Desktop.
Save amitozdeol/b4c82494112883154c583ab5ff8a65b9 to your computer and use it in GitHub Desktop.
Terminal new commands

tldr > man

It's amazing that nearly every single command line tool comes with a manual via man , but navigating the man output can be sometimes a little confusing, plus it can be daunting given all the technical information that's included in the manual output.

htop > top

htop is an improvement on both regular top and crappy-mac top. Lots of colour coding, keyboard bindings and different views which have helped me in the past to understand which processes belong to which.

Handy key bindings include:

P - sort by CPU M - sort by memory usage F4 - filter processes by string (to narrow to just "node" for instance) space - mark a single process so I can watch if the process is spiking

bat > cat

cat is used to print the contents of a file, but given more time spent in the command line, features like syntax highlighting come in very handy. I found ccat which offers highlighting then I found bat which has highlighting, paging, line numbers and git integration.

The bat command also allows me to search during output (only if the output is longer than the screen height) using the / key binding (similarly to less searching).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment