CLI Tools Cheat Sheet

A cheat sheet for useful Linux CLI tools

awk

  • A tool with similar capabilities to cat and cut where it can read file contents and customize the output.

// Selecting text fields from a file
root@box ~ $ awk '{print $1 ""}' subdomains.txt
blog.techwithtyler.dev
braindump.techwithtyler.dev
techwithtyler.dev
www.techwithtyler.dev

cat

  • A tool for reading file contents onto standard output (STDOUT).

// Reading files
root@box ~ $ cat subdomains.txt
blog.techwithtyler.dev 234234234
braindump.techwithtyler.dev 25346536
techwithtyler.dev 43564356743
www.techwithtyler.dev 45776568

cut

  • A tool for removing sections from each line of files

export

  • Useful to create env vars or updating your $PATH

find

  • More advanced than the locate tool.

  • It can search based on several attributes e.g., permissions, timestamp, file size, and more.

locate

  • A useful tool for quickly finding files and directories.

  • Install it with: sudo apt install mlocate

  • It's a local database that gets updated regularly with a cron job but can otherwise be forced to update with: sudo updatedb

which

  • Searches the $PATH environment variable for any executable matching the search.

Last updated

Was this helpful?