tar.1 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174
  1. .\" This file is part of GNU tar. -*- nroff -*-
  2. .\" Copyright 2013-2014 Free Software Foundation, Inc.
  3. .\"
  4. .\" GNU tar is free software; you can redistribute it and/or modify
  5. .\" it under the terms of the GNU General Public License as published by
  6. .\" the Free Software Foundation; either version 3 of the License, or
  7. .\" (at your option) any later version.
  8. .\"
  9. .\" GNU tar is distributed in the hope that it will be useful,
  10. .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. .\" GNU General Public License for more details.
  13. .\"
  14. .\" You should have received a copy of the GNU General Public License
  15. .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. .TH TAR 1 "February 22, 2014" "TAR" "GNU TAR Manual"
  17. .SH NAME
  18. tar \- an archiving utility
  19. .SH SYNOPSIS
  20. .SS Traditional usage
  21. \fBtar\fR {\fBA\fR|\fBc\fR|\fBd\fR|\fBr\fR|\fBt\fR|\fBu\fR|\fBx\fR}\
  22. [\fBGnSkUWOmpsMBiajJzZhPlRvwo\fR] [\fIARG\fR...]
  23. .SS UNIX-style usage
  24. .sp
  25. \fBtar\fR \fB\-A\fR [\fIOPTIONS\fR] \fIARCHIVE\fR \fIARCHIVE\fR
  26. .sp
  27. \fBtar\fR \fB\-c\fR [\fB\-f\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIFILE\fR...]
  28. .sp
  29. \fBtar\fR \fB\-d\fR [\fB\-f\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIFILE\fR...]
  30. .sp
  31. \fBtar\fR \fB\-t\fR [\fB\-f\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIMEMBER\fR...]
  32. .sp
  33. \fBtar\fR \fB\-r\fR [\fB\-f\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIFILE\fR...]
  34. .sp
  35. \fBtar\fR \fB\-u\fR [\fB\-f\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIFILE\fR...]
  36. .sp
  37. \fBtar\fR \fB\-x\fR [\fB\-f\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIMEMBER\fR...]
  38. .SS GNU-style usage
  39. .sp
  40. \fBtar\fR {\fB\-\-catenate\fR|\fB\-\-concatenate} [\fIOPTIONS\fR] \fIARCHIVE\fR \fIARCHIVE\fR
  41. .sp
  42. \fBtar\fR \fB\-\-create\fR [\fB\-\-file\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIFILE\fR...]
  43. .sp
  44. \fBtar\fR {\fB\-\-diff\fR|\fB\-\-compare\fR} [\fB\-\-file\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIFILE\fR...]
  45. .sp
  46. \fBtar\fR \fB\-\-delete\fR [\fB\-\-file\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIMEMBER\fR...]
  47. .sp
  48. \fBtar\fR \fB\-\-append\fR [\fB\-f\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIFILE\fR...]
  49. .sp
  50. \fBtar\fR \fB\-\-list\fR [\fB\-f\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIMEMBER\fR...]
  51. .sp
  52. \fBtar\fR \fB\-\-test\-label\fR [\fB\-\-file\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fILABEL\fR...]
  53. .sp
  54. \fBtar\fR \fB\-\-update\fR [\fB\-\-file\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIFILE\fR...]
  55. .sp
  56. \fBtar\fR \fB\-\-update\fR [\fB\-f\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIFILE\fR...]
  57. .sp
  58. \fBtar\fR {\fB\-\-extract\fR|\fB\-\-get\fR} [\fB\-f\fR \fIARCHIVE\fR] [\fIOPTIONS\fR] [\fIMEMBER\fR...]
  59. .SH NOTE
  60. This manpage is a short description of GNU \fBtar\fR. For a detailed
  61. discussion, including examples and usage recommendations, refer to the
  62. \fBGNU Tar Manual\fR available in texinfo format. If the \fBinfo\fR
  63. reader and the tar documentation are properly installed on your
  64. system, the command
  65. .PP
  66. .RS +4
  67. .B info tar
  68. .RE
  69. .PP
  70. should give you access to the complete manual.
  71. .PP
  72. You can also view the manual using the info mode in
  73. .BR emacs (1),
  74. or find it in various formats online at
  75. .PP
  76. .RS +4
  77. .B http://www.gnu.org/software/tar/manual
  78. .RE
  79. .PP
  80. If any discrepancies occur between this manpage and the
  81. \fBGNU Tar Manual\fR, the later shall be considered the authoritative
  82. source.
  83. .SH DESCRIPTION
  84. GNU
  85. .B tar
  86. is an archiving program designed to store multiple files in a single
  87. file (an \fBarchive\fR), and to manipulate such archives. The archive
  88. can be either a regular file or a device (e.g. a tape drive, hence the name
  89. of the program, which stands for \fBt\fRape \fBar\fRchiver), which can
  90. be located either on the local or on a remote machine.
  91. .PP
  92. .SS Option styles
  93. Options to GNU \fBtar\fR can be given in three different styles.
  94. In
  95. .BR "traditional style" ,
  96. the first argument is a cluster of option letters and all subsequent
  97. arguments supply arguments to those options that require them. The
  98. arguments are read in the same order as the option letters. Any
  99. command line words that remain after all options has been processed
  100. are treated as non-optional arguments: file or archive member names.
  101. .PP
  102. For example, the \fBc\fR option requires creating the archive, the
  103. \fBv\fR option requests the verbose operation, and the \fBf\fR option
  104. takes an argument that sets the name of the archive to operate upon.
  105. The following command, written in the traditional style, instructs tar
  106. to store all files from the directory
  107. .B /etc
  108. into the archive file
  109. .B etc.tar
  110. verbosely listing the files being archived:
  111. .PP
  112. .EX
  113. .B tar cfv a.tar /etc
  114. .EE
  115. .PP
  116. In
  117. .BR "UNIX " or " short-option style" ,
  118. each option letter is prefixed with a single dash, as in other command
  119. line utilities. If an option takes argument, the argument follows it,
  120. either as a separate command line word, or immediately following the
  121. option. However, if the option takes an \fBoptional\fR argument, the
  122. argument must follow the option letter without any intervening
  123. whitespace, as in \fB\-g/tmp/snar.db\fR.
  124. .PP
  125. Any number of options not taking arguments can be
  126. clustered together after a single dash, e.g. \fB\-vkp\fR. Options
  127. that take arguments (whether mandatory or optional), can appear at
  128. the end of such a cluster, e.g. \fB\-vkpf a.tar\fR.
  129. .PP
  130. The example command above written in the
  131. .B short-option style
  132. could look like:
  133. .PP
  134. .EX
  135. .B tar -cvf a.tar /etc
  136. or
  137. .B tar -c -v -f a.tar /etc
  138. .EE
  139. .PP
  140. In
  141. .BR "GNU " or " long-option style" ,
  142. each option begins with two dashes and has a meaningful name,
  143. consisting of lower-case letters and dashes. When used, the long
  144. option can be abbreviated to its initial letters, provided that
  145. this does not create ambiguity. Arguments to long options are
  146. supplied either as a separate command line word, immediately following
  147. the option, or separated from the option by an equals sign with no
  148. intervening whitespace. Optional arguments must always use the latter
  149. method.
  150. .PP
  151. Here are several ways of writing the example command in this style:
  152. .PP
  153. .EX
  154. .B tar --create --file a.tar --verbose /etc
  155. .EE
  156. or (abbreviating some options):
  157. .EX
  158. .B tar --cre --file=a.tar --verb /etc
  159. .EE
  160. .PP
  161. The options in all three styles can be intermixed, although doing so
  162. with old options is not encouraged.
  163. .SS Operation mode
  164. The options listed in the table below tell GNU \fBtar\fR what
  165. operation it is to perform. Exactly one of them must be given.
  166. Meaning of non-optional arguments depends on the operation mode
  167. requested.
  168. .TP
  169. \fB\-A\fR, \fB\-\-catenate\fR, \fB\-\-concatenate\fR
  170. Append archive to the end of another archive. The arguments are
  171. treated as the names of archives to append. All archives must be of
  172. the same format as the archive they are appended to, otherwise the
  173. resulting archive might be unusable with non-GNU implementations of
  174. \fBtar\fR. Notice also that when more than one archive is given, the
  175. members from archives other than the first one will be accessible in
  176. the resulting archive only if using the \fB\-i\fR
  177. (\fB\-\-ignore\-zeros) option.
  178. Compressed archives cannot be concatenated.
  179. .TP
  180. \fB\-c\fR, \fB\-\-create\fR
  181. Create a new archive. Arguments supply the names of the files to be
  182. archived. Directories are archived recursively, unless the
  183. \fB\-\-no\-recursion\fR option is given.
  184. .TP
  185. \fB\-d\fR, \fB\-\-diff\fR, \fB\-\-compare\fR
  186. Find differences between archive and file system. The arguments are
  187. optional and specify archive members to compare. If not given, the
  188. current working directory is assumed.
  189. .TP
  190. \fB\-\-delete\fR
  191. Delete from the archive. The arguments supply names of the archive
  192. members to be removed. At least one argument must be given.
  193. This option does not operate on compressed archives. There is no
  194. short option equivalent.
  195. .TP
  196. \fB\-r\fR, \fB\-\-append\fR
  197. Append files to the end of an archive. Arguments have the same
  198. meaning as for \fB\-c\fR (\fB\-\-create).
  199. .TP
  200. \fB\-t\fR, \fB\-\-list\fR
  201. List the contents of an archive. Arguments are optional. When given,
  202. they specify the names of the members to list.
  203. .TP
  204. \fB\-\-test\-label
  205. Test the archive volume label and exit. When used without arguments,
  206. it prints the volume label (if any) and exits with status \fB0\fR.
  207. When one or more command line arguments are given.
  208. .B tar
  209. compares the volume label with each argument. It exits with code
  210. \fB0\fR if a match is found, and with code \fB1\fR otherwise. No
  211. output is displayed, unless used together with the \fB\-v\fR
  212. (\fB\-\-verbose\fR) option.
  213. There is no short option equivalent for this option.
  214. .TP
  215. \fB\-u\fR, \fB\-\-update\fR
  216. Append files which are newer than the corresponding copy in the
  217. archive. Arguments have the same meaning as with \fB\-c\fR and
  218. \fB\-r\fR options.
  219. .TP
  220. \fB\-x\fR, \fB\-\-extract\fR, \fB\-\-get\fR
  221. Extract files from an archive. Arguments are optional. When given,
  222. they specify names of the archive members to be extracted.
  223. .TP
  224. .TP
  225. \fB\-\-show\-defaults\fR
  226. Show built-in defaults for various \fBtar\fR options and exit. No
  227. arguments are allowed.
  228. .TP
  229. \fB\-?\fR, \fB\-\-help
  230. Display a short option summary and exit. No arguments allowed.
  231. .TP
  232. \fB\-\-usage\fR
  233. Display a list of available options and exit. No arguments allowed.
  234. .TP
  235. \fB\-\-version\fR
  236. Print program version and copyright information and exit.
  237. .SH OPTIONS
  238. .SS Operation modifiers
  239. .TP
  240. \fB\-\-check\-device\fR
  241. Check device numbers when creating incremental archives (default).
  242. .TP
  243. \fB\-g\fR, \fB\-\-listed\-incremental\fR=\fIFILE\fR
  244. Handle new GNU-format incremental backups. \fIFILE\fR is the name of
  245. a \fBsnapshot file\fR, where tar stores additional information which
  246. is used to decide which files changed since the previous incremental
  247. dump and, consequently, must be dumped again. If \fIFILE\fR does not
  248. exist when creating an archive, it will be created and all files will
  249. be added to the resulting archive (the \fBlevel 0\fR dump). To create
  250. incremental archives of non-zero level \fBN\fR, create a copy of the
  251. snapshot file created during the level \fBN-1\fR, and use it as
  252. \fIFILE\fR.
  253. When listing or extracting, the actual contents of \fIFILE\fR is not
  254. inspected, it is needed only due to syntactical requirements. It is
  255. therefore common practice to use \fB/dev/null\fR in its place.
  256. .TP
  257. \fB\-G\fR, \fB\-\-incremental\fR
  258. Handle old GNU-format incremental backups.
  259. .TP
  260. \fB\-\-ignore\-failed\-read\fR
  261. Do not exit with nonzero on unreadable files.
  262. .TP
  263. \fB\-\-level\fR=\fINUMBER\fR
  264. Set dump level for created listed-incremental archive. Currently only
  265. \fB\-\-level=0\fR is meaningful: it instructs \fBtar\fR to truncate
  266. the snapshot file before dumping, thereby forcing a level 0 dump.
  267. .TP
  268. \fB\-n\fR, \fB\-\-seek\fR
  269. Assume the archive is seekable. Normally \fBtar\fR determines
  270. automatically whether the archive can be seeked or not. This option
  271. is intended for use in cases when such recognition fails. It takes
  272. effect only if the archive is open for reading (e.g. with
  273. .B \-\-list
  274. or
  275. .B \-\-extract
  276. options).
  277. .TP
  278. \fB\-\-no\-check\-device\fR
  279. Do not check device numbers when creating incremental archives.
  280. .TP
  281. \fB\-\-no\-seek\fR
  282. Assume the archive is not seekable.
  283. .TP
  284. \fB\-\-occurrence\fR[=\fIN\fR]
  285. Process only the \fIN\fRth occurrence of each file in the
  286. archive. This option is valid only when used with one of the
  287. following subcommands: \fB\-\-delete\fR, \fB\-\-diff\fR,
  288. \fB\-\-extract\fR or \fB\-\-list\fR and when a list of files is given
  289. either on the command line or via the \fB\-\fRT option. The default
  290. \fIN\fR is \fB1\fR.
  291. .TP
  292. \fB\-\-restrict\fR
  293. Disable the use of some potentially harmful options.
  294. .TP
  295. \fB\-\-sparse\-version\fR=\fIMAJOR\fR[.\fIMINOR\fR]
  296. Set version of the sparse format to use (implies \fB\-\-sparse\fR).
  297. This option implies
  298. .BR \-\-sparse .
  299. Valid argument values are
  300. .BR 0.0 ,
  301. .BR 0.1 ", and"
  302. .BR 1.0 .
  303. For a detailed discussion of sparse formats, refer to the \fBGNU Tar
  304. Manual\fR, appendix \fBD\fR, "\fBSparse Formats\fR". Using \fBinfo\fR
  305. reader, it can be accessed running the following command:
  306. .BR "info tar 'Sparse Formats'" .
  307. .TP
  308. \fB\-S\fR, \fB\-\-sparse\fR
  309. Handle sparse files efficiently. Some files in the file system may
  310. have segments which were actually never written (quite often these are
  311. database files created by such systems as \fBDBM\fR). When given this
  312. option, \fBtar\fR attempts to determine if the file is sparse prior to
  313. archiving it, and if so, to reduce the resulting archive size by not
  314. dumping empty parts of the file.
  315. .SS Overwrite control
  316. These options control \fBtar\fR actions when extracting a file over
  317. an existing copy on disk.
  318. .TP
  319. \fB\-k\fR, \fB\-\-keep\-old\-files\fR
  320. Don't replace existing files when extracting.
  321. .TP
  322. \fB\-\-keep\-newer\-files\fR
  323. Don't replace existing files that are newer than their archive copies.
  324. .TP
  325. \fB\-\-no\-overwrite\-dir\fR
  326. Preserve metadata of existing directories.
  327. .TP
  328. \fB\-\-one\-top\-level\fR[\fB=\fIDIR\fR]
  329. Extract all files into \fIDIR\fR, or, if used without argument, into a
  330. subdirectory named by the base name of the archive (minus standard
  331. compression suffixes recognizable by \fB\-\-auto\-compress).
  332. .TP
  333. \fB\-\-overwrite\fR
  334. Overwrite existing files when extracting.
  335. .TP
  336. \fB\-\-overwrite\-dir\fR
  337. Overwrite metadata of existing directories when extracting (default).
  338. .TP
  339. \fB\-\-recursive\-unlink\fR
  340. Recursively remove all files in the directory prior to extracting it.
  341. .TP
  342. \fB\-\-remove\-files\fR
  343. Remove files from disk after adding them to the archive.
  344. .TP
  345. \fB\-U\fR, \fB\-\-unlink\-first\fR
  346. Remove each file prior to extracting over it.
  347. .TP
  348. \fB\-W\fR, \fB\-\-verify\fR
  349. Verify the archive after writing it.
  350. .SS Output stream selection
  351. .TP
  352. \fB\-\-ignore\-command\-error\fR
  353. .TP
  354. Ignore subprocess exit codes.
  355. .TP
  356. \fB\-\-no\-ignore\-command\-error\fR
  357. Treat non-zero exit codes of children as error (default).
  358. .TP
  359. \fB\-O\fR, \fB\-\-to\-stdout\fR
  360. Extract files to standard output.
  361. .TP
  362. \fB\-\-to\-command\fR=\fICOMMAND\fR
  363. Pipe extracted files to \fICOMMAND\fR. The argument is the pathname
  364. of an external program, optionally with command line arguments. The
  365. program will be invoked and the contents of the file being extracted
  366. supplied to it on its standard output. Additional data will be
  367. supplied via the following environment variables:
  368. .RS
  369. .TP
  370. .B TAR_FILETYPE
  371. Type of the file. It is a single letter with the following meaning:
  372. .sp
  373. .nf
  374. .ta 8n 20n
  375. f Regular file
  376. d Directory
  377. l Symbolic link
  378. h Hard link
  379. b Block device
  380. c Character device
  381. .fi
  382. Currently only regular files are supported.
  383. .TP
  384. .B TAR_MODE
  385. File mode, an octal number.
  386. .TP
  387. .B TAR_FILENAME
  388. The name of the file.
  389. .TP
  390. .B TAR_REALNAME
  391. Name of the file as stored in the archive.
  392. .TP
  393. .B TAR_UNAME
  394. Name of the file owner.
  395. .TP
  396. .B TAR_GNAME
  397. Name of the file owner group.
  398. .TP
  399. .B TAR_ATIME
  400. Time of last access. It is a decimal number, representing seconds
  401. since the Epoch. If the archive provides times with nanosecond
  402. precision, the nanoseconds are appended to the timestamp after a
  403. decimal point.
  404. .TP
  405. .B TAR_MTIME
  406. Time of last modification.
  407. .TP
  408. .B TAR_CTIME
  409. Time of last status change.
  410. .TP
  411. .B TAR_SIZE
  412. Size of the file.
  413. .TP
  414. .B TAR_UID
  415. UID of the file owner.
  416. .TP
  417. .B TAR_GID
  418. GID of the file owner.
  419. .RE
  420. .RS
  421. Additionally, the following variables contain information about
  422. \fBtar\fR operation mode and the archive being processed:
  423. .TP
  424. .B TAR_VERSION
  425. GNU \fBtar\fR version number.
  426. .TP
  427. .B TAR_ARCHIVE
  428. The name of the archive \fBtar\fR is processing.
  429. .TP
  430. .B TAR_BLOCKING_FACTOR
  431. Current blocking factor, i.e. number of 512-byte blocks in a record.
  432. .TP
  433. .B TAR_VOLUME
  434. Ordinal number of the volume \fBtar\fR is processing (set if
  435. reading a multi-volume archive).
  436. .TP
  437. .B TAR_FORMAT
  438. Format of the archive being processed. One of:
  439. .BR gnu ,
  440. .BR oldgnu ,
  441. .BR posix ,
  442. .BR ustar ,
  443. .BR v7 .
  444. .B TAR_SUBCOMMAND
  445. A short option (with a leading dash) describing the operation \fBtar\fR is
  446. executing.
  447. .RE
  448. .SS Handling of file attributes
  449. .TP
  450. \fB\-\-atime\-preserve\fR[=\fIMETHOD\fR]
  451. Preserve access times on dumped files, either by restoring the times
  452. after reading (\fIMETHOD\fR=\fBreplace\fR, this is the default) or by
  453. not setting the times in the first place (\fIMETHOD\fR=\fBsystem\fR)
  454. .TP
  455. \fB\-\-delay\-directory\-restore\fR
  456. Delay setting modification times and permissions of extracted
  457. directories until the end of extraction. Use this option when
  458. extracting from an archive which has unusual member ordering.
  459. .TP
  460. \fB\-\-group\fR=\fINAME\fR
  461. Force \fINAME\fR as group for added files.
  462. .TP
  463. \fB\-\-mode\fR=\fICHANGES\fR
  464. Force symbolic mode \fICHANGES\fR for added files.
  465. .TP
  466. \fB\-\-mtime\fR=\fIDATE-OR-FILE\fR
  467. Set mtime for added files. \fIDATE-OR-FILE\fR is either a date/time
  468. in almost arbitrary formate, or the name of an existing file. In the
  469. latter case the mtime of that file will be used.
  470. .TP
  471. \fB\-m\fR, \fB\-\-touch\fR
  472. Don't extract file modified time.
  473. .TP
  474. \fB\-\-no\-delay\-directory\-restore\fR
  475. Cancel the effect of the prior \fB\-\-delay\-directory\-restore\fR option.
  476. .TP
  477. \fB\-\-no\-same\-owner\fR
  478. Extract files as yourself (default for ordinary users).
  479. .TP
  480. \fB\-\-no\-same\-permissions\fR
  481. Apply the user's umask when extracting permissions from the archive
  482. (default for ordinary users).
  483. .TP
  484. \fB\-\-numeric\-owner\fR
  485. Always use numbers for user/group names.
  486. .TP
  487. \fB\-\-owner\fR=\fINAME\fR
  488. Force \fINAME\fR as owner for added files.
  489. .TP
  490. \fB\-p\fR, \fB\-\-preserve\-permissions\fR, \fB\-\-same\-permissions\fR
  491. extract information about file permissions (default for superuser)
  492. .TP
  493. \fB\-\-preserve\fR
  494. Same as both \fB\-p\fR and \fB\-s\fR.
  495. .TP
  496. \fB\-\-same\-owner\fR
  497. Try extracting files with the same ownership as exists in the archive
  498. (default for superuser).
  499. .TP
  500. \fB\-s\fR, \fB\-\-preserve\-order\fR, \fB\-\-same\-order\fR
  501. Sort names to extract to match archive
  502. .TP
  503. \fB\-\-sort=\fIORDER\fR
  504. When creating an archive, sort directory entries according to
  505. \fIORDER\fR, which is one of
  506. .BR none ,
  507. .BR name ", or"
  508. .BR inode .
  509. The default is \fB\-\-sort=none\fR, which stores archive members in
  510. the same order as returned by the operating system.
  511. Using \fB\-\-sort=name\fR ensures the member ordering in the created archive
  512. is uniform and reproducible.
  513. Using \fB\-\-sort=inode\fR reduces the number of disk seeks made when
  514. creating the archive and thus can considerably speed up archivation.
  515. This sorting order is supported only if the underlying system provides
  516. the necessary information.
  517. .SS Device selection and switching
  518. .TP
  519. \fB\-f\fR, \fB\-\-file\fR=\fIARCHIVE\fR
  520. Use archive file or device \fIARCHIVE\fR. If this option is not
  521. given, \fBtar\fR will first examine the environment variable `TAPE'.
  522. If it is set, its value will be used as the archive name. Otherwise,
  523. \fBtar\fR will assume the compiled-in default. The default
  524. value can be inspected either using the
  525. .B \-\-show\-defaults
  526. option, or at the end of the \fBtar \-\-help\fR output.
  527. An archive name that has a colon in it specifies a file or device on a
  528. remote machine. The part before the colon is taken as the machine
  529. name or IP address, and the part after it as the file or device
  530. pathname, e.g.:
  531. .EX
  532. --file=remotehost:/dev/sr0
  533. .EE
  534. An optional username can be prefixed to the hostname, placing a \fB@\fR
  535. sign between them.
  536. By default, the remote host is accessed via the
  537. .BR rsh (1)
  538. command. Nowadays it is common to use
  539. .BR ssh (1)
  540. instead. You can do so by giving the following command line option:
  541. .EX
  542. --rsh-command=/usr/bin/ssh
  543. .EE
  544. The remote mashine should have the
  545. .BR rmt (8)
  546. command installed. If its pathname does not match \fBtar\fR's
  547. default, you can inform \fBtar\fR about the correct pathname using the
  548. .B \-\-rmt\-command
  549. option.
  550. .TP
  551. \fB\-\-force\-local\fR
  552. Archive file is local even if it has a colon.
  553. .TP
  554. \fB\-\fRF, \fB\-\-info\-script\fR=\fICOMMAND\fR, \fB\-\-new\-volume\-script\fR=\fICOMMAND\fR
  555. Run \fICOMMAND\fR at the end of each tape (implies \fB\-M\fR). The
  556. command can include arguments. When started, it will inherit \fBtar\fR's
  557. environment plus the following variables:
  558. .RS
  559. .TP
  560. .B TAR_VERSION
  561. GNU \fBtar\fR version number.
  562. .TP
  563. .B TAR_ARCHIVE
  564. The name of the archive \fBtar\fR is processing.
  565. .TP
  566. .B TAR_BLOCKING_FACTOR
  567. Current blocking factor, i.e. number of 512-byte blocks in a record.
  568. .TP
  569. .B TAR_VOLUME
  570. Ordinal number of the volume \fBtar\fR is processing (set if
  571. reading a multi-volume archive).
  572. .TP
  573. .B TAR_FORMAT
  574. Format of the archive being processed. One of:
  575. .BR gnu ,
  576. .BR oldgnu ,
  577. .BR posix ,
  578. .BR ustar ,
  579. .BR v7 .
  580. .TP
  581. .B TAR_SUBCOMMAND
  582. A short option (with a leading dash) describing the operation \fBtar\fR is
  583. executing.
  584. .TP
  585. .B TAR_FD
  586. File descriptor which can be used to communicate the new volume name
  587. to
  588. .BR tar .
  589. .RE
  590. .RS
  591. If the info script fails, \fBtar\fR exits; otherwise, it begins writing
  592. the next volume.
  593. .RE
  594. .TP
  595. \fB\-L\fR, \fB\-\-tape\-length\fR=\fN\fR
  596. Change tape after writing \fIN\fRx1024 bytes. If \fIN\fR is followed
  597. by a size suffix (see the subsection
  598. .B Size suffixes
  599. below), the suffix specifies the multiplicative factor to be used
  600. instead of 1024.
  601. This option implies
  602. .BR \-M .
  603. .TP
  604. \fB\-M\fR, \fB\-\-multi\-volume\fR
  605. Create/list/extract multi-volume archive.
  606. .TP
  607. \fB\-\-rmt\-command\fR=\fICOMMAND\fR
  608. Use \fICOMMAND\fR instead of \fBrmt\fR when accessing remote
  609. archives. See the description of the
  610. .B \-f
  611. option, above.
  612. .TP
  613. \fB\-\-rsh\-command\fR=\fICOMMAND\fR
  614. Use \fICOMMAND\fR instead of \fBrsh\fR when accessing remote
  615. archives. See the description of the
  616. .B \-f
  617. option, above.
  618. .TP
  619. \fB\-\-volno\-file\fR=\fIFILE\fR
  620. When this option is used in conjunction with
  621. .BR \-\-multi\-volume ,
  622. .B tar
  623. will keep track of which volume of a multi-volume archive it is
  624. working in \fIFILE\fR.
  625. .SS Device blocking
  626. .TP
  627. \fB\-b\fR, \fB\-\-blocking\-factor\fR=\fIBLOCKS\fR
  628. Set record size to \fIBLOCKS\fRx\fB512\fR bytes.
  629. .TP
  630. \fB\-B\fR, \fB\-\-read\-full\-records\fR
  631. When listing or extracting, accept incomplete input records after
  632. end-of-file marker.
  633. .TP
  634. \fB\-i\fR, \fB\-\-ignore\-zeros\fR
  635. Ignore zeroed blocks in archive. Normally two consecutive 512-blocks
  636. filled with zeroes mean EOF and tar stops reading after encountering
  637. them. This option instructs it to read further and is useful when
  638. reading archives created with the \fB\-A\fR option.
  639. .TP
  640. \fB\-\-record\-size\fR=\fINUMBER\fR
  641. Set record size. \fINUMBER\fR is the number of bytes per record. It
  642. must be multiple of \fB512\fR. It can can be suffixed with a \fBsize
  643. suffix\fR, e.g. \fB\-\-record-size=10K\fR, for 10 Kilobytes. See the
  644. subsection
  645. .BR "Size suffixes" ,
  646. for a list of valid suffixes.
  647. .SS Archive format selection
  648. .TP
  649. \fB\-H\fR, \fB\-\-format\fR=\fIFORMAT\fR
  650. Create archive of the given format. Valid formats are:
  651. .RS
  652. .TP
  653. .B gnu
  654. GNU tar 1.13.x format
  655. .TP
  656. .B oldgnu
  657. GNU format as per tar <= 1.12.
  658. .TP
  659. \fBpax\fR, \fBposix\fR
  660. POSIX 1003.1-2001 (pax) format.
  661. .TP
  662. .B ustar
  663. POSIX 1003.1-1988 (ustar) format.
  664. .TP
  665. .B v7
  666. Old V7 tar format.
  667. .RE
  668. .TP
  669. \fB\-\-old\-archive\fR, \fB\-\-portability\fR
  670. Same as \fB\-\-format=v7\fR.
  671. .TP
  672. \fB\-\-pax\-option\fR=\fIkeyword\fR[[:]=\fIvalue\fR][,\fIkeyword\fR[[:]=\fIvalue\fR]]...
  673. Control pax keywords when creating \fBPAX\fR archives (\fB\-H
  674. pax\fR). This option is equivalent to the \fB\-o\fR option of the
  675. .BR pax (1) utility.
  676. .TP
  677. \fB\-\-posix\fR
  678. Same as \fB\-\-format=posix\fR.
  679. .TP
  680. \fB\-V\fR, \fB\-\-label\fR=\fITEXT\fR
  681. Create archive with volume name \fITEXT\fR. If listing or extracting,
  682. use \fITEXT\fR as a globbing pattern for volume name.
  683. .SS Compression options
  684. .TP
  685. \fB\-a\fR, \fB\-\-auto\-compress\fR
  686. Use archive suffix to determine the compression program.
  687. .TP
  688. \fB\-\fRI, \fB\-\-use\-compress\-program\fI=\fICOMMAND\fR
  689. Filter data through \fICOMMAND\fR. It must accept the \fB\-d\fR
  690. option, for decompression. The argument can contain command line
  691. options.
  692. .TP
  693. \fB\-j\fR, \fB\-\-bzip2\fR
  694. Filter the archive through
  695. .BR bzip2 (1).
  696. .TP
  697. \fB\-J\fR, \fB\-\-xz\fR
  698. Filter the archive through
  699. .BR xz (1).
  700. .TP
  701. \fB\-\-lzip\fR
  702. Filter the archive through
  703. .BR lzip (1).
  704. .TP
  705. \fB\-\-lzma\fR
  706. Filter the archive through
  707. .BR lzma (1).
  708. .TP
  709. \fB\-\-lzop\fR
  710. Filter the archive through
  711. .BR lzop (1).
  712. .TP
  713. \fB\-\-no\-auto\-compress\fR
  714. Do not use archive suffix to determine the compression program.
  715. .TP
  716. \fB\-z\fR, \fB\-\-gzip\fR, \fB\-\-gunzip\fR, \fB\-\-ungzip\fR
  717. Filter the archive through
  718. .BR gzip (1).
  719. .TP
  720. \fB\-\fRZ, \fB\-\-compress\fR, \fB\-\-uncompress\fR
  721. Filter the archive through
  722. .BR compress (1).
  723. .SS Local file selection
  724. .TP
  725. \fB\-\-add\-file\fR=\fIFILE\fR
  726. Add \fIFILE\fR to the archive (useful if its name starts with a dash).
  727. .TP
  728. \fB\-\-backup\fR[=\fICONTROL\fR]
  729. Backup before removal. The \fICONTROL\fR argument, if supplied,
  730. controls the backup policy. Its valid values are:
  731. .RS
  732. .TP
  733. .BR none ", " off
  734. Never make backups.
  735. .TP
  736. .BR t ", " numbered
  737. Make numbered backups.
  738. .TP
  739. .BR nil ", " existing
  740. Make numbered backups if numbered backups exist, simple backups otherwise.
  741. .TP
  742. .BR never ", " simple
  743. Always make simple backups
  744. .RS
  745. .RE
  746. If \fICONTROL\fR is not given, the value is taken from the
  747. .B VERSION_CONTROL
  748. environment variable. If it is not set, \fBexisting\fR is assumed.
  749. .RE
  750. .TP
  751. \fB\-C\fR, \fB\-\-directory\fR=\fIDIR\fR
  752. Change to directory DIR.
  753. .TP
  754. \fB\-\-exclude\fR=\fIPATTERN\fR
  755. Exclude files matching \fIPATTERN\fR, a
  756. .BR glob (3)-style
  757. wildcard pattern.
  758. .TP
  759. \fB\-\-exclude\-backups\fR
  760. Exclude backup and lock files.
  761. .TP
  762. \fB\-\-exclude\-caches\fR
  763. Exclude contents of directories containing file \fBCACHEDIR.TAG\fR,
  764. except for the tag file itself.
  765. .TP
  766. \fB\-\-exclude\-caches\-all\fR
  767. Exclude directories containing file \fBCACHEDIR.TAG\fR and the file itself.
  768. .TP
  769. \fB\-\-exclude\-caches\-under\fR
  770. Exclude everything under directories containing \fBCACHEDIR.TAG\fR
  771. .TP
  772. \fB\-\-exclude\-ignore=\fIFILE\fR
  773. Before dumping a directory, see if it contains \fIFILE\fR.
  774. If so, read exclusion patterns from this file. The patterns affect
  775. only the directory itself.
  776. .TP
  777. \fB\-\-exclude\-ignore\-recursive=\fIFILE\fR
  778. Same as \fB\-\-exclude\-ignore\fR, except that patterns from
  779. \fIFILE\fR affect both the directory and all its subdirectories.
  780. .TP
  781. \fB\-\-exclude\-tag\fR=\fIFILE\fR
  782. Exclude contents of directories containing \fIFILE\fR, except for
  783. \fIFILE\fR itself.
  784. .TP
  785. \fB\-\-exclude\-tag\-all\fR=\fIFILE\fR
  786. Exclude directories containing \fIFILE\fR.
  787. .TP
  788. \fB\-\-exclude\-tag\-under\fR=\fIFILE\fR
  789. Exclude everything under directories containing \fIFILE\fR.
  790. .TP
  791. \fB\-\-exclude\-vcs\fR
  792. Exclude version control system directories.
  793. .TP
  794. \fB\-\-exclude\-vcs\-ignores\fR
  795. Exclude files that match patterns read from VCS-specific ignore
  796. files. Supported files are:
  797. .BR .cvsignore ,
  798. .BR .gitignore ,
  799. .BR .bzrignore ", and"
  800. .BR .hgignore .
  801. .TP
  802. \fB\-h\fR, \fB\-\-dereference\fR
  803. Follow symlinks; archive and dump the files they point to.
  804. .TP
  805. \fB\-\-hard\-dereference\fR
  806. Follow hard links; archive and dump the files they refer to.
  807. .TP
  808. \fB\-K\fR, \fB\-\-starting\-file\fR=\fIMEMBER\fR
  809. Begin at the given member in the archive.
  810. .TP
  811. \fB\-\-newer\-mtime\fR=\fIDATE\fR
  812. Work on files whose data changed after the \fIDATE\fR. If \fIDATE\fR
  813. starts with \fB/\fR or \fB.\fR it is taken to be a file name; the
  814. mtime of that file is used as the date.
  815. .TP
  816. \fB\-\-no\-null\fR
  817. Disable the effect of the previous \fB\-\-null\fR option.
  818. .TP
  819. \fB\-\-no\-recursion\fR
  820. Avoid descending automatically in directories.
  821. .TP
  822. \fB\-\-no\-unquote\fR
  823. Do not unquote input file or member names.
  824. .TP
  825. \fB\-\-null\fR
  826. Instruct subsequent \fB\-T\fR options to read null-terminated names,
  827. disable handling of the \fB\-C\fR option read from the file.
  828. .TP
  829. \fB\-N\fR, \fB\-\-newer\fR=\fIDATE\fR, \fB\-\-after\-date\fR=\fIDATE\fR
  830. Only store files newer than DATE. If \fIDATE\fR starts with \fB/\fR
  831. or \fB.\fR it is taken to be a file name; the ctime of that file is
  832. used as the date.
  833. .TP
  834. \fB\-\-one\-file\-system\fR
  835. Stay in local file system when creating archive.
  836. .TP
  837. \fB\-P\fR, \fB\-\-absolute\-names\fR
  838. Don't strip leading slashes from file names when creating archives.
  839. .TP
  840. \fB\-\-recursion\fR
  841. Recurse into directories (default).
  842. .TP
  843. \fB\-\-suffix\fR=\fISTRING\fR
  844. Backup before removal, override usual suffix. Default suffix is \fB~\fR,
  845. unless overridden by environment variable \fBSIMPLE_BACKUP_SUFFIX\fR.
  846. .TP
  847. \fB\-T\fR, \fB\-\-files\-from\fR=\fIFILE\fR
  848. Get names to extract or create from \fIFILE\fR.
  849. .TP
  850. \fB\-\-unquote\fR
  851. Unquote file or member names (default).
  852. .TP
  853. \fB\-X\fR, \fB\-\-exclude\-from\fR=\fIFILE\fR
  854. Exclude files matching patterns listed in FILE.
  855. .SS File name transformations
  856. .TP
  857. \fB\-\-strip\-components\fR=\fINUMBER\fR
  858. Strip \fINUMBER\fR leading components from file names on extraction.
  859. .TP
  860. \fB\-\-transform\fR=\fIEXPRESSION\dR, \fB\-\-xform\fR=\fIEXPRESSION\fR
  861. Use sed replace \fIEXPRESSION\fR to transform file names.
  862. .SS File name matching options
  863. These options affect both exclude and include patterns.
  864. .TP
  865. \fB\-\-anchored\fR
  866. Patterns match file name start.
  867. .TP
  868. \fB\-\-ignore\-case\fR
  869. Ignore case.
  870. .TP
  871. \fB\-\-no\-anchored\fR
  872. Patterns match after any \fB/\fR (default for exclusion).
  873. .TP
  874. \fB\-\-no\-ignore\-case\fR
  875. Case sensitive matching (default).
  876. .TP
  877. \fB\-\-no\-wildcards\fR
  878. Verbatim string matching.
  879. .TP
  880. \fB\-\-no\-wildcards\-match\-slash\fR
  881. Wildcards do not match \fB/\fR.
  882. .TP
  883. \fB\-\-wildcards\fR
  884. Use wildcards (default for exclusion).
  885. .TP
  886. \fB\-\-wildcards\-match\-slash\fR
  887. Wildcards match \fB/\fR (default for exclusion).
  888. .SS Informative output
  889. .TP
  890. \fB\-\-checkpoint\fR[=\fIN\fR]
  891. Display progress messages every \fIN\fRth record (default 10).
  892. .TP
  893. \fB\-\-checkpoint\-action\fR=\fIACTION\fR
  894. Run \fIACTION\fR on each checkpoint.
  895. .TP
  896. \fB\-\-full\-time\fR
  897. Print file time to its full resolution.
  898. .TP
  899. \fB\-\-index\-file\fR=\fIFILE\fR
  900. Send verbose output to \fIFILE\fR.
  901. .TP
  902. \fB\-l\fR, \fB\-\-check\-links\fR
  903. Print a message if not all links are dumped.
  904. .TP
  905. \fB\-\-no\-quote\-chars\fR=\fISTRING\fR
  906. Disable quoting for characters from \fISTRING\fR.
  907. .TP
  908. \fB\-\-quote\-chars\fR=\fISTRING\fR
  909. Additionally quote characters from \fISTRING\fR.
  910. .TP
  911. \fB\-\-quoting\-style\fR=\fISTYLE\fR
  912. Set quoting style for file and member names. Valid values for
  913. \fISTYLE\fR are
  914. .BR literal ,
  915. .BR shell ,
  916. .BR shell-always ,
  917. .BR c ,
  918. .BR c-maybe ,
  919. .BR escape ,
  920. .BR locale ,
  921. .BR clocale .
  922. .TP
  923. \fB\-R\fR, \fB\-\-block\-number\fR
  924. Show block number within archive with each message.
  925. .TP
  926. \fB\-\-show\-omitted\-dirs\fR
  927. When listing or extracting, list each directory that does not match
  928. search criteria.
  929. .TP
  930. \fB\-\-show\-transformed\-names\fR, \fB\-\-show\-stored\-names\fR
  931. Show file or archive names after transformation by \fB\-\-strip\fR and
  932. \fB\-\-transform\fR options.
  933. .TP
  934. \fB\-\-totals\fR[=\fISIGNAL\fR]
  935. Print total bytes after processing the archive. If \fISIGNAL\fR is
  936. given, print total bytes when this signal is delivered. Allowed
  937. signals are:
  938. .BR SIGHUP ,
  939. .BR SIGQUIT ,
  940. .BR SIGINT ,
  941. .BR SIGUSR1 ", and"
  942. .BR SIGUSR2 .
  943. The \fBSIG\fR prefix can be omitted.
  944. .TP
  945. \fB\-\-utc\fR
  946. Print file modification times in UTC.
  947. .TP
  948. \fB\-v\fR, \fB\-\-verbose\fR
  949. Verbosely list files processed.
  950. .TP
  951. \fB\-\-warning\fR=\fIKEYWORD\fR
  952. Enable or disable warning messages identified by \fIKEYWORD\fR. The
  953. messages are suppressed if \fIKEYWORD\fR is prefixed with \fBno\-\fR
  954. and enabled otherwise.
  955. Multiple \fB\-\-warning\fR messages accumulate.
  956. Keywords controlling general \fBtar\fR operation:
  957. .RS
  958. .TP
  959. .B all
  960. Enable all warning messages. This is the default.
  961. .TP
  962. .B none
  963. Disable all warning messages.
  964. .TP
  965. .B filename-with-nuls
  966. "%s: file name read contains nul character"
  967. .TP
  968. .B alone-zero-block
  969. "A lone zero block at %s"
  970. .HP
  971. Keywords applicable for \fBtar --create\fR:
  972. .TP
  973. .B cachedir
  974. "%s: contains a cache directory tag %s; %s"
  975. .TP
  976. .B file-shrank
  977. "%s: File shrank by %s bytes; padding with zeros"
  978. .TP
  979. .B xdev
  980. "%s: file is on a different filesystem; not dumped"
  981. .TP
  982. .B file-ignored
  983. "%s: Unknown file type; file ignored"
  984. .br
  985. "%s: socket ignored"
  986. .br
  987. "%s: door ignored"
  988. .TP
  989. .B file-unchanged
  990. "%s: file is unchanged; not dumped"
  991. .TP
  992. .B ignore-archive
  993. "%s: file is the archive; not dumped"
  994. .TP
  995. .B file-removed
  996. "%s: File removed before we read it"
  997. .TP
  998. .B file-changed
  999. "%s: file changed as we read it"
  1000. .HP
  1001. Keywords applicable for \fBtar --extract\fR:
  1002. .TP
  1003. .B timestamp
  1004. "%s: implausibly old time stamp %s"
  1005. .br
  1006. "%s: time stamp %s is %s s in the future"
  1007. .TP
  1008. .B contiguous-cast
  1009. "Extracting contiguous files as regular files"
  1010. .TP
  1011. .B symlink-cast
  1012. "Attempting extraction of symbolic links as hard links"
  1013. .TP
  1014. .B unknown-cast
  1015. "%s: Unknown file type '%c', extracted as normal file"
  1016. .TP
  1017. .B ignore-newer
  1018. "Current %s is newer or same age"
  1019. .TP
  1020. .B unknown-keyword
  1021. "Ignoring unknown extended header keyword '%s'"
  1022. .TP
  1023. .B decompress-program
  1024. Controls verbose description of failures occurring when trying to run
  1025. alternative decompressor programs. This warning is disabled by
  1026. default (unless \fB\-\-verbose\fR is used). A common example of what
  1027. you can get when using this warning is:
  1028. .EX
  1029. $ \fBtar --warning=decompress-program -x -f archive.Z
  1030. tar (child): cannot run compress: No such file or directory
  1031. tar (child): trying gzip
  1032. .EE
  1033. This means that \fBtar\fR first tried to decompress
  1034. \fBarchive.Z\fR using \fBcompress\fR, and, when that
  1035. failed, switched to \fBgzip\fR.
  1036. .TP
  1037. .B record-size
  1038. "Record size = %lu blocks"
  1039. .HP
  1040. Keywords controlling incremental extraction:
  1041. .TP
  1042. .B rename-directory
  1043. "%s: Directory has been renamed from %s"
  1044. .br
  1045. "%s: Directory has been renamed"
  1046. .TP
  1047. .B new-directory
  1048. "%s: Directory is new"
  1049. .TP
  1050. .B xdev
  1051. "%s: directory is on a different device: not purging"
  1052. .TP
  1053. .B bad-dumpdir
  1054. "Malformed dumpdir: 'X' never used"
  1055. .RE
  1056. .TP
  1057. \fB\-w\fR, \fB\-\-interactive\fR, \fB\-\-confirmation\fR
  1058. Ask for confirmation for every action.
  1059. .SS Compatibility options
  1060. .TP
  1061. \fB\-o\fR
  1062. When creating, same as \fB\-\-old\-archive\fR. When extracting, same
  1063. as \fB\-\-no\-same\-owner\fR.
  1064. .SS Size suffixes
  1065. .sp
  1066. .nf
  1067. .ta 8n 18n 42n
  1068. .ul
  1069. Suffix Units Byte Equivalent
  1070. b Blocks \fISIZE\fR x 512
  1071. B Kilobytes \fISIZE\fR x 1024
  1072. c Bytes \fISIZE\fR
  1073. G Gigabytes \fISIZE\fR x 1024^3
  1074. K Kilobytes \fISIZE\fR x 1024
  1075. k Kilobytes \fISIZE\fR x 1024
  1076. M Megabytes \fISIZE\fR x 1024^2
  1077. P Petabytes \fISIZE\fR x 1024^5
  1078. T Terabytes \fISIZE\fR x 1024^4
  1079. w Words \fISIZE\fR x 2
  1080. .fi
  1081. .PP
  1082. .SH "RETURN VALUE"
  1083. Tar exit code indicates whether it was able to successfully perform
  1084. the requested operation, and if not, what kind of error occurred.
  1085. .TP
  1086. .B 0
  1087. Successful termination.
  1088. .TP
  1089. .B 1
  1090. .I Some files differ.
  1091. If tar was invoked with the \fB\-\-compare\fR (\fB\-\-diff\fR, \fB\-d\fR)
  1092. command line option, this means that some files in the archive differ
  1093. from their disk counterparts. If tar was given one of the \fB\-\-create\fR,
  1094. \fB\-\-append\fR or \fB\-\-update\fR options, this exit code means
  1095. that some files were changed while being archived and so the resulting
  1096. archive does not contain the exact copy of the file set.
  1097. .TP
  1098. .B 2
  1099. .I Fatal error.
  1100. This means that some fatal, unrecoverable error occurred.
  1101. .PP
  1102. If a subprocess that had been invoked by
  1103. .B tar
  1104. exited with a nonzero exit code,
  1105. .B tar
  1106. itself exits with that code as well. This can happen, for example, if
  1107. a compression option (e.g. \fB\-z\fR) was used and the external
  1108. compressor program failed. Another example is
  1109. .B rmt
  1110. failure during backup to a remote device.
  1111. .SH "SEE ALSO"
  1112. .BR bzip2 (1),
  1113. .BR compress (1),
  1114. .BR gzip (1),
  1115. .BR lzma (1),
  1116. .BR lzop (1),
  1117. .BR rmt (8),
  1118. .BR symlink (7),
  1119. .BR tar (5),
  1120. .BR xz (1).
  1121. .PP
  1122. Complete \fBtar\fR manual: run
  1123. .B info tar
  1124. or use
  1125. .BR emacs (1)
  1126. info mode to read it.
  1127. .PP
  1128. Online copies of \fBGNU tar\fR documentation in various formats can be
  1129. found at:
  1130. .PP
  1131. .in +4
  1132. .B http://www.gnu.org/software/tar/manual
  1133. .SH "BUG REPORTS"
  1134. Report bugs to <bug\[email protected]>.
  1135. .SH COPYRIGHT
  1136. Copyright \(co 2013 Free Software Foundation, Inc.
  1137. .br
  1138. .na
  1139. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  1140. .br
  1141. .ad
  1142. This is free software: you are free to change and redistribute it.
  1143. There is NO WARRANTY, to the extent permitted by law.
  1144. .\" Local variables:
  1145. .\" eval: (add-hook 'write-file-hooks 'time-stamp)
  1146. .\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.\\-]* [0-9] \""
  1147. .\" time-stamp-format: "%:B %:d, %:y"
  1148. .\" time-stamp-end: "\""
  1149. .\" time-stamp-line-limit: 20
  1150. .\" end: