Giving Proper UNIX Usage Errors
Usage messages are displayed as an error message from a command or shell script whenever required options or arguments are missing from the command line or when incorrect ones are given. A message beginning with the word Usage always means that you have entered an incorrect command; it then gives the proper usage or syntax for that command or shell script:
$ cp abc Usage: cp [-fip] source_file target_file $
“Usage” Means “Error”In Chapter 1, “Introduction to UNIX and the Shell,” you learned that in UNIX, no news is good news. Many beginners see a Usage message pop up from one of their commands and do not realize that the command has failed. When you see the word Usage, think “Error, you have misused this command. ... |
Get Practical UNIX now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.