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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

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

  




 

 

Next: , Previous: All Options, Up: tar invocation


3.5 GNU tar documentation

Being careful, the first thing is really checking that you are using GNU tar, indeed. The --version option causes tar to print information about its name, version, origin and legal status, all on standard output, and then exit successfully. For example, ‘tar --version’ might print:

     tar (GNU tar) 1.15.2
     Copyright (C) 2006 Free Software Foundation, Inc.
     This is free software.  You may redistribute copies of it under the terms of
     the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
     There is NO WARRANTY, to the extent permitted by law.
     
     Written by John Gilmore and Jay Fenlason.

The first occurrence of ‘tar’ in the result above is the program name in the package (for example, rmt is another program), while the second occurrence of ‘tar’ is the name of the package itself, containing possibly many programs. The package is currently named ‘tar’, after the name of the main program it contains1.

Another thing you might want to do is checking the spelling or meaning of some particular tar option, without resorting to this manual, for once you have carefully read it. GNU tar has a short help feature, triggerable through the --help option. By using this option, tar will print a usage message listing all available options on standard output, then exit successfully, without doing anything else and ignoring all other options. Even if this is only a brief summary, it may be several screens long. So, if you are not using some kind of scrollable window, you might prefer to use something like:

     $ tar --help | less

presuming, here, that you like using less for a pager. Other popular pagers are more and pg. If you know about some keyword which interests you and do not want to read all the --help output, another common idiom is doing:

     tar --help | grep keyword

for getting only the pertinent lines. Notice, however, that some tar options have long description lines and the above command will list only the first of them.

The exact look of the option summary displayed by tar --help is configurable. See Configuring Help Summary, for a detailed description.

If you only wish to check the spelling of an option, running tar --usage may be a better choice. This will display a terse list of tar option without accompanying explanations.

The short help output is quite succinct, and you might have to get back to the full documentation for precise points. If you are reading this paragraph, you already have the tar manual in some form. This manual is available in a variety of forms from https://www.gnu.org/software/tar/manual. It may printed out of the GNU tar distribution, provided you have TeX already installed somewhere, and a laser printer around. Just configure the distribution, execute the command ‘make dvi’, then print doc/tar.dvi the usual way (contact your local guru to know how). If GNU tar has been conveniently installed at your place, this manual is also available in interactive, hypertextual form as an Info file. Just call ‘info tar’ or, if you do not have the info program handy, use the Info reader provided within GNU Emacs, calling ‘tar’ from the main Info menu.

There is currently no man page for GNU tar. If you observe such a man page on the system you are running, either it does not belong to GNU tar, or it has not been produced by GNU. Some package maintainers convert tar --help output to a man page, using help2man. In any case, please bear in mind that the authoritative source of information about GNU tar is this Texinfo documentation.


Footnotes

[1] There are plans to merge the cpio and tar packages into a single one which would be called paxutils. So, who knows if, one of this days, the --version would not output ‘tar (GNU paxutils) 3.2


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