Useful commands I can never remember

  • by Amando Abreu
  • on 18 September 2016

A list of commands I use often but can’t seem to be able to memorise.

find dirname/ -name \*.sql

find all .sql files in directory called dirname/

sudo du -a /dir/ | sort -n -r | head -n 20

Find and order the 20th largest files in a server in /dir/

grep 'PRETTY_NAME' /etc/*release | cut -d'=' -f2

Get only the value of ‘PRETTY_NAME’ of the /etc/*release file that may look like this:

NAME="Amazon Linux"
ID_LIKE="centos rhel fedora"
PRETTY_NAME="Amazon Linux 2"

About the author

Amando Abreu got into electronics as a kid, started programming microchips in his early teens, moved onto web development in his late teens, and got into people; psychology; and business in his twenties. Currently co-founder & CTO @
No comments, just