Explain a Command

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


Delete files extracted from a tarball
tar -tf file.tar.gz | xargs rm -r
tar
tar(1)
an archiving utility
-t
-t, --list

List the contents of an archive.  Arguments are optional.  When given, they specify the names of the members to list.

-f file.tar.gz
-f, --file=ARCHIVE

Use archive file or device ARCHIVE.  If this option is not given, tar will first examine the environment variable `TAPE'. If it is set, its value will be used as the archive name.  Otherwise, tar will assume the compiled-in default.  The default value can be inspected either using the --show-defaults option, or at the end of the tar --help output.

An archive name that has a colon in it specifies a file or device on a remote machine.  The part before the colon is taken as the machine name or IP address, and…

| Output of above is piped to:
xargs
xargs(1)
build and execute command lines from standard input
rm
rm(1)
remove files or directories
-r
-r, -R, --recursive

remove directories and their contents recursively


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.