How to interpret the bash command "usage" syntax?

Posted by raoulsson on Server Fault See other posts from Server Fault or by raoulsson
Published on 2010-03-20T20:42:57Z Indexed on 2010/03/20 20:51 UTC
Read the original article Hit count: 423

Filed under:
|
|

How exactly do you have to interpret the output of a commands "usage" output, in bash for example.

For example, on my OS X, cp gives me

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
  • What does the nested options, like -H within -R, indicate?
  • Does upper and lower case have any meaning?
  • When is an argument optional, required?

I need to implement a telnet command line against a program of mine and I would like to get this straight.

© Server Fault or respective owner

Related posts about bash

Related posts about usage