README 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. README for GNU tar
  2. See the end of file for copying conditions.
  3. * Introduction
  4. Please glance through *all* sections of this
  5. 'README' file before starting configuration. Also make sure you read files
  6. 'ABOUT-NLS' and 'INSTALL' if you are not familiar with them already.
  7. If you got the 'tar' distribution in 'shar' format, time stamps ought to be
  8. properly restored; do not ignore such complaints at 'unshar' time.
  9. GNU 'tar' saves many files together into a single tape or disk
  10. archive, and can restore individual files from the archive. It includes
  11. multivolume support, the ability to archive sparse files, automatic archive
  12. compression/decompression, remote archives and special features that allow
  13. 'tar' to be used for incremental and full backups. This distribution
  14. also includes 'rmt', the remote tape server. The 'mt' tape drive control
  15. program is in the GNU 'cpio' distribution.
  16. GNU 'tar' is derived from John Gilmore's public domain 'tar'.
  17. See file 'ABOUT-NLS' for how to customize this program to your language.
  18. See file 'COPYING' for copying conditions.
  19. See file 'INSTALL' for compilation and installation instructions.
  20. See file 'NEWS' for a list of major changes in the current release.
  21. See file 'THANKS' for a list of contributors.
  22. Besides those configure options documented in files 'INSTALL' and
  23. 'ABOUT-NLS', an extra option may be accepted after './configure':
  24. * Install
  25. ** Selecting the default archive format.
  26. The default archive format is GNU, this can be overridden by
  27. presetting DEFAULT_ARCHIVE_FORMAT while configuring. The allowed
  28. values are GNU, V7, OLDGNU, USTAR and POSIX.
  29. ** Selecting the default archive device
  30. The default archive device is now 'stdin' on read and 'stdout' on write.
  31. The installer can still override this by presetting 'DEFAULT_ARCHIVE'
  32. in the environment before configuring (the behavior of '-[0-7]' or
  33. '-[0-7]lmh' options in 'tar' are then derived automatically). Similarly,
  34. 'DEFAULT_BLOCKING' can be preset to something else than 20.
  35. ** Selecting full pathname of the "rmt" binary.
  36. Previous versions of tar always looked for "rmt" binary in the
  37. directory "/etc/rmt". However, the "rmt" program included
  38. in the distribution was installed under "$prefix/libexec/rmt".
  39. To fix this discrepancy, tar now looks for "$prefix/libexec/rmt".
  40. If you do not want this behavior, specify full path name of
  41. "rmt" binary using DEFAULT_RMT_DIR variable, e.g.:
  42. ./configure DEFAULT_RMT_DIR=/etc
  43. If you already have a copy of "rmt" installed and wish to use it
  44. instead of the version supplied with the distribution, use --with-rmt
  45. option:
  46. ./configure --with-rmt=/etc/rmt
  47. This will also disable building the included version of rmt.
  48. ** Installing backup scripts.
  49. This version of tar is shipped with the shell scripts for producing
  50. incremental backups (dumps) and restoring filesystems from them.
  51. The name of the backup script is "backup". The name of the
  52. restore script is "restore". They are installed in "$prefix/sbin"
  53. directory.
  54. Use option --enable-backup-scripts to compile and install these
  55. scripts.
  56. ** '--disable-largefile' omits support for large files, even if the
  57. operating system supports large files. Typically, large files are
  58. those larger than 2 GB on a 32-bit host.
  59. * Installation hints
  60. Here are a few hints which might help installing 'tar' on some systems.
  61. ** gzip and bzip2.
  62. GNU tar uses the gzip and bzip2 programs to read and write compressed
  63. archives. If you don't have these programs already, you need to
  64. install them. Their sources can be found at:
  65. ftp://ftp.gnu.org/gnu/gzip/
  66. http://sourceware.cygnus.com/bzip2/
  67. If you see the following symptoms:
  68. $ tar -xzf file.tar.gz
  69. gzip: stdin: decompression OK, trailing garbage ignored
  70. tar: Child returned status 2
  71. then you have encountered a gzip incompatibility that should be fixed
  72. in gzip test version 1.3, which as of this writing is available at
  73. <ftp://alpha.gnu.org/gnu/gzip/>. You can work around the
  74. incompatibility by using a shell command like
  75. 'gzip -d <file.tar.gz | tar -xzf -'.
  76. ** Solaris issues.
  77. GNU tar exercises many features that can cause problems with older GCC
  78. versions. In particular, GCC 2.8.1 (sparc, -O1 or -O2) is known to
  79. miscompile GNU tar. No compiler-related problems have been reported
  80. when using GCC 2.95.2 or later.
  81. Recent versions of Solaris tar sport a new -E option to generate
  82. extended headers in an undocumented format. GNU tar does not
  83. understand these headers.
  84. ** Static linking.
  85. Some platform will, by default, prepare a smaller 'tar' executable
  86. which depends on shared libraries. Since GNU 'tar' may be used for
  87. system-level backups and disaster recovery, installers might prefer to
  88. force static linking, making a bigger 'tar' executable maybe, but able to
  89. work standalone, in situations where shared libraries are not available.
  90. The way to achieve static linking varies between systems. Set LDFLAGS
  91. to a value from the table below, before configuration (see 'INSTALL').
  92. Platform Compiler LDFLAGS
  93. (any) Gnu C -static
  94. AIX (vendor) -bnso -bI:/lib/syscalls.exp
  95. HPUX (vendor) -Wl,-a,archive
  96. IRIX (vendor) -non_shared
  97. OSF (vendor) -non_shared
  98. SCO 3.2v5 (vendor) -dn
  99. Solaris (vendor) -Bstatic
  100. SunOS (vendor) -Bstatic
  101. ** Failed tests 'ignfail.sh' or 'incremen.sh'.
  102. In an NFS environment, lack of synchronization between machine clocks
  103. might create difficulties to any tool comparing dates and file time stamps,
  104. like 'tar' in incremental dumps. This has been a recurrent problem with
  105. GNU Make for the last few years. We would like a general solution.
  106. ** BSD compatibility matters.
  107. Set LIBS to '-lbsd' before configuration (see 'INSTALL') if the linker
  108. complains about 'bsd_ioctl' (Slackware). Also set CPPFLAGS to
  109. '-I/usr/include/bsd' if <sgtty.h> is not found (Slackware).
  110. ** OPENStep 4.2 swap files
  111. Tar cannot read the file /private/vm/swapfile.front (even as root).
  112. This file is not a real file, but some kind of uncompressed view of
  113. the real compressed swap file; there is no reason to back it up, so
  114. the simplest workaround is to avoid tarring this file.
  115. * Special topics
  116. Here are a few special matters about GNU 'tar', not related to build
  117. matters. See previous section for such.
  118. ** File attributes.
  119. About *security*, it is probable that future releases of 'tar' will have
  120. some behavior changed. There are many pending suggestions to choose from.
  121. Today, extracting an archive not being 'root', 'tar' will restore suid/sgid
  122. bits on files but owned by the extracting user. 'root' automatically gets
  123. a lot of special privileges, '-p' might later become required to get them.
  124. GNU 'tar' does not properly restore symlink attributes. Various systems
  125. implement flavors of symbolic links showing different behavior and
  126. properties. We did not successfully sorted all these out yet. Currently,
  127. the 'lchown' call will be used if available, but that's all.
  128. ** POSIX compliance.
  129. GNU 'tar' is able to create archive in the following formats:
  130. *** The format of UNIX version 7
  131. *** POSIX.1-1988 format, also known as "ustar format"
  132. *** POSIX.1-2001 format, also known as "pax format"
  133. *** Old GNU format (described below)
  134. In addition to those, GNU 'tar' is also able to read archives
  135. produced by 'star' archiver.
  136. A so called 'Old GNU' format is based on an early draft of the
  137. POSIX 1003.1 'ustar' standard which is different from the final
  138. standard. It defines its extensions (such as incremental backups
  139. and handling of the long file names) in a way incompatible with
  140. any existing tar archive format, therefore the use of old GNU
  141. format is strongly discouraged.
  142. Please read the file NEWS for more information about POSIX compliance
  143. and new 'tar' features.
  144. * What's next?
  145. GNU tar will be merged into GNU paxutils: a project containing
  146. several utilities related to creating and handling archives in
  147. various formats. The project will include tar, cpio and pax
  148. utilities.
  149. * Bug reporting.
  150. Send bug reports to <[email protected]>. A bug report should contain
  151. an adequate description of the problem, your input, what you expected,
  152. what you got, and why this is wrong. Diffs are welcome, but they only
  153. describe a solution, from which the problem might be uneasy to infer.
  154. If needed, submit actual data files with your report. Small data files
  155. are preferred. Big files may sometimes be necessary, but do not send them
  156. to the report address; rather take special arrangement with the maintainer.
  157. Your feedback will help us to make a better and more portable package.
  158. Consider documentation errors as bugs, and report them as such. If you
  159. develop anything pertaining to 'tar' or have suggestions, let us know
  160. and share your findings by writing to <[email protected]>.
  161. * Copying
  162. Copyright 1990-2023 Free Software Foundation, Inc.
  163. This file is part of GNU tar.
  164. GNU tar is free software; you can redistribute it and/or modify
  165. it under the terms of the GNU General Public License as published by
  166. the Free Software Foundation; either version 3 of the License, or
  167. (at your option) any later version.
  168. GNU tar is distributed in the hope that it will be useful,
  169. but WITHOUT ANY WARRANTY; without even the implied warranty of
  170. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  171. GNU General Public License for more details.
  172. You should have received a copy of the GNU General Public License
  173. along with this program. If not, see <http://www.gnu.org/licenses/>.
  174. NOTE ON COPYRIGHT YEARS
  175. In copyright notices where the copyright holder is the Free Software
  176. Foundation, then where a range of years appears, this is an inclusive
  177. range that applies to every year in the range. For example: 2005-2008
  178. represents the years 2005, 2006, 2007, and 2008.
  179. Local Variables:
  180. mode: outline
  181. paragraph-separate: "[ ]*$"
  182. version-control: never
  183. End: