Explain a Command

A quick way to see what commands and their options do before running them.

Print the largest files or folders in the current dir (including ones starting with a dot)
du -s * .[^.]* | sort -n | tail
du
du(1)
estimate file space usage
-s
-s, --summarize

display only a total for each argument

* .[^.]*
|
sort
sort(1)
sort lines of text files
-n
-n, --numeric-sort

compare according to string numerical value; see manual for which strings are supported

|
tail
tail(1)
output the last part of files
Share

Sample Commands

Delete files extracted from a tarball
tar -tf file.tar.gz | xargs rm -r

Generate a random 16-char password
strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 16 | tr -d '\n'

Print the largest files or folders in the current dir
du -s * | sort -n | tail

Read More

From our blog:

Want to build something like this? Have a look at ManKier's API.

For another take on explaining commands, check out explainshell.com.