Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Next: , Up: Styles

3.3.1 Mnemonic Option Style

Each option has at least one long (or mnemonic) name starting with two dashes in a row, e.g., --list. The long names are more clear than their corresponding short or old names. It sometimes happens that a single mnemonic option has many different different names which are synonymous, such as --compare and --diff. In addition, long option names can be given unique abbreviations. For example, --cre can be used in place of --create because there is no other mnemonic option which begins with ‘cre’. (One way to find this out is by trying it and seeing what happens; if a particular abbreviation could represent more than one option, tar will tell you that that abbreviation is ambiguous and you'll know that that abbreviation won't work. You may also choose to run ‘tar --help’ to see a list of options. Be aware that if you run tar with a unique abbreviation for the long name of an option you didn't want to use, you are stuck; tar will perform the command as ordered.)

Mnemonic options are meant to be obvious and easy to remember, and their meanings are generally easier to discern than those of their corresponding short options (see below). For example:

     $ tar --create --verbose --blocking-factor=20 --file=/dev/rmt0

gives a fairly good set of hints about what the command does, even for those not fully acquainted with tar.

Mnemonic options which require arguments take those arguments immediately following the option name. There are two ways of specifying a mandatory argument. It can be separated from the option name either by an equal sign, or by any amount of white space characters. For example, the --file option (which tells the name of the tar archive) is given a file such as archive.tar as argument by using any of the following notations: --file=archive.tar or --file archive.tar.

In contrast, optional arguments must always be introduced using an equal sign. For example, the --backup option takes an optional argument specifying backup type. It must be used as --backup=backup-type.

  Published under the terms of the GNU General Public License Design by Interspire