[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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.35
Copyright (C) 2013-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
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 contains(7).

Another thing you might want to do is check the spelling or meaning of some particular tar option, without resorting to this manual, 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 section 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 options 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 be 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.

Since 2014, GNU tar also has a man page. It briefly explains all the options and operations. This might be preferable when you don’t need any background. But bear in mind that the authoritative source of information about GNU tar is this Texinfo documentation.

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on August 23, 2023 using texi2html 5.0.