[Tutor] What are all those letters after terminal commands?
Walter Prins
wprins at gmail.com
Thu Aug 23 15:42:31 CEST 2012
Hi Cecilia,
On 23 August 2012 14:18, Cecilia Chavana-Bryant
<cecilia.chavana at gmail.com> wrote:
> recommendations, it would have put me off. At the beginning of Chapter 8 -
> Moving around (pushd, popd) on Source: 13 exercise 8 I found this command:
> mkdir -p i/like/icecream. I am guessing that the -p stands for directory
> path? I have seen other such letters sometimes with or without the ' - '
> before them (I think) in commands so my question is, what are these letters
> for? what are they called? and could someone please point me to where I can
> find a list of these with descriptions of what they do.
These are variously called command "switches" or "options", thus named
because they switch certain behaviours on and off or specify optional
information to the command. On *nix like systems, you can usually
find full and comprehensive documentation on any command using the
"man" (for manual) or "info" (in lieu of information) commands. For
example, try:
man mkdir
In "mkdir"'s case, the default behaviour/convention is for mkdir's
parameter to specify the single folder name to be created in the
current working folder. The "-p" switch modifies this behaviour so
that the parameter is instead interpreted to be a full path that may
include several folders, and the behaviour is modified such that mkdir
then will, as needed, created all the folders along the entire path
specified.
HTH,
Walter
More information about the Tutor
mailing list