Explain a Command

Check what a command does, share a command with an automatic detailed explanation.


Generate a random 16-char password
strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 16 | tr -d '\n'
strings
strings(1)
print the sequences of printable characters in files
/dev/urandom
| Output of above is piped to:
grep
grep(1)
print lines that match patterns
-o
-o, --only-matching

Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line.

'[[:alnum:]]'
| Output of above is piped to:
head(1)
output the first part of files
-n 16
-n, --lines=[-]NUM

print the first NUM lines instead of the first 10; with the leading '-', print all but the last NUM lines of each file

| Output of above is piped to:
tr
tr(1)
translate or delete characters
-d
-d, --delete

delete characters in ARRAY1, do not translate

'\n'

Sample Commands

List files, newest first
ls -lth

See commands currently using the internet
lsof -i -n

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

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

Read More

Blog entries:

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

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