Sunday, February 1, 2015

Learning command arguments using ExplainShell.com

Suppose you come across the following command in a script. You are not quite sure what it does. Specifically, you want to know the meaning of each command argument.

$ wget --spider -r -nd -nv -H -l 1 -w 2 -o test.log http://example.com/

Traditionally, to find out what each argument does, you look up the man page for the wget command. Then, you scroll through page after page of information, and extract the description for each argument. This is a time-consuming, and eye-straining exercise.

Thanks to the Explainshell.com website. Now, you simply enter the above command on that website, and click a button.

The output clearly displays a description of each specified argument from the man page.

One caveat is that the information from Explainshell.com is sourced from the Ubuntu man pages. So, it is great for commands that you often run on Ubuntu or Debian systems. But, you won't find anything for Fedora/Centos/RedHat-specific commands such as yum.

Even with that limitation, Explainshell.com is a great learning tool for Linux command-line users. If you are interested in the inner workings of Explainshell.com, click this link.

No comments: