tar.1 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288
  1. .\" This file is part of GNU tar. -*- nroff -*-
  2. .\" Copyright 2013-2014, 2016 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 "December 5, 2015" "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\fR} [\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\fR) 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\fR).
  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\-\-hole\-detection\fR=\fIMETHOD\fR
  258. Use \fIMETHOD\fR to detect holes in sparse files. This option implies
  259. \fB\-\-sparse\fR. Valid values for \fIMETHOD\fR are \fBseek\fR and
  260. \fBraw\fR. Default is \fBseek\fR with fallback to \fBraw\fR when not
  261. applicable.
  262. .TP
  263. \fB\-G\fR, \fB\-\-incremental\fR
  264. Handle old GNU-format incremental backups.
  265. .TP
  266. \fB\-\-ignore\-failed\-read\fR
  267. Do not exit with nonzero on unreadable files.
  268. .TP
  269. \fB\-\-level\fR=\fINUMBER\fR
  270. Set dump level for created listed-incremental archive. Currently only
  271. \fB\-\-level=0\fR is meaningful: it instructs \fBtar\fR to truncate
  272. the snapshot file before dumping, thereby forcing a level 0 dump.
  273. .TP
  274. \fB\-n\fR, \fB\-\-seek\fR
  275. Assume the archive is seekable. Normally \fBtar\fR determines
  276. automatically whether the archive can be seeked or not. This option
  277. is intended for use in cases when such recognition fails. It takes
  278. effect only if the archive is open for reading (e.g. with
  279. .B \-\-list
  280. or
  281. .B \-\-extract
  282. options).
  283. .TP
  284. \fB\-\-no\-check\-device\fR
  285. Do not check device numbers when creating incremental archives.
  286. .TP
  287. \fB\-\-no\-seek\fR
  288. Assume the archive is not seekable.
  289. .TP
  290. \fB\-\-occurrence\fR[=\fIN\fR]
  291. Process only the \fIN\fRth occurrence of each file in the
  292. archive. This option is valid only when used with one of the
  293. following subcommands: \fB\-\-delete\fR, \fB\-\-diff\fR,
  294. \fB\-\-extract\fR or \fB\-\-list\fR and when a list of files is given
  295. either on the command line or via the \fB\-T\fR option. The default
  296. \fIN\fR is \fB1\fR.
  297. .TP
  298. \fB\-\-restrict\fR
  299. Disable the use of some potentially harmful options.
  300. .TP
  301. \fB\-\-sparse\-version\fR=\fIMAJOR\fR[.\fIMINOR\fR]
  302. Set version of the sparse format to use (implies \fB\-\-sparse\fR).
  303. This option implies
  304. .BR \-\-sparse .
  305. Valid argument values are
  306. .BR 0.0 ,
  307. .BR 0.1 ", and"
  308. .BR 1.0 .
  309. For a detailed discussion of sparse formats, refer to the \fBGNU Tar
  310. Manual\fR, appendix \fBD\fR, "\fBSparse Formats\fR". Using \fBinfo\fR
  311. reader, it can be accessed running the following command:
  312. .BR "info tar 'Sparse Formats'" .
  313. .TP
  314. \fB\-S\fR, \fB\-\-sparse\fR
  315. Handle sparse files efficiently. Some files in the file system may
  316. have segments which were actually never written (quite often these are
  317. database files created by such systems as \fBDBM\fR). When given this
  318. option, \fBtar\fR attempts to determine if the file is sparse prior to
  319. archiving it, and if so, to reduce the resulting archive size by not
  320. dumping empty parts of the file.
  321. .SS Overwrite control
  322. These options control \fBtar\fR actions when extracting a file over
  323. an existing copy on disk.
  324. .TP
  325. \fB\-k\fR, \fB\-\-keep\-old\-files\fR
  326. Don't replace existing files when extracting.
  327. .TP
  328. \fB\-\-keep\-newer\-files\fR
  329. Don't replace existing files that are newer than their archive copies.
  330. .TP
  331. \fB\-\-no\-overwrite\-dir\fR
  332. Preserve metadata of existing directories.
  333. .TP
  334. \fB\-\-one\-top\-level\fR[\fB=\fIDIR\fR]
  335. Extract all files into \fIDIR\fR, or, if used without argument, into a
  336. subdirectory named by the base name of the archive (minus standard
  337. compression suffixes recognizable by \fB\-\-auto\-compress).
  338. .TP
  339. \fB\-\-overwrite\fR
  340. Overwrite existing files when extracting.
  341. .TP
  342. \fB\-\-overwrite\-dir\fR
  343. Overwrite metadata of existing directories when extracting (default).
  344. .TP
  345. \fB\-\-recursive\-unlink\fR
  346. Recursively remove all files in the directory prior to extracting it.
  347. .TP
  348. \fB\-\-remove\-files\fR
  349. Remove files from disk after adding them to the archive.
  350. .TP
  351. \fB\-\-skip\-old\-files
  352. Don't replace existing files when extracting, silently skip over them.
  353. .TP
  354. \fB\-U\fR, \fB\-\-unlink\-first\fR
  355. Remove each file prior to extracting over it.
  356. .TP
  357. \fB\-W\fR, \fB\-\-verify\fR
  358. Verify the archive after writing it.
  359. .SS Output stream selection
  360. .TP
  361. \fB\-\-ignore\-command\-error\fR
  362. .TP
  363. Ignore subprocess exit codes.
  364. .TP
  365. \fB\-\-no\-ignore\-command\-error\fR
  366. Treat non-zero exit codes of children as error (default).
  367. .TP
  368. \fB\-O\fR, \fB\-\-to\-stdout\fR
  369. Extract files to standard output.
  370. .TP
  371. \fB\-\-to\-command\fR=\fICOMMAND\fR
  372. Pipe extracted files to \fICOMMAND\fR. The argument is the pathname
  373. of an external program, optionally with command line arguments. The
  374. program will be invoked and the contents of the file being extracted
  375. supplied to it on its standard output. Additional data will be
  376. supplied via the following environment variables:
  377. .RS
  378. .TP
  379. .B TAR_FILETYPE
  380. Type of the file. It is a single letter with the following meaning:
  381. .sp
  382. .nf
  383. .ta 8n 20n
  384. f Regular file
  385. d Directory
  386. l Symbolic link
  387. h Hard link
  388. b Block device
  389. c Character device
  390. .fi
  391. Currently only regular files are supported.
  392. .TP
  393. .B TAR_MODE
  394. File mode, an octal number.
  395. .TP
  396. .B TAR_FILENAME
  397. The name of the file.
  398. .TP
  399. .B TAR_REALNAME
  400. Name of the file as stored in the archive.
  401. .TP
  402. .B TAR_UNAME
  403. Name of the file owner.
  404. .TP
  405. .B TAR_GNAME
  406. Name of the file owner group.
  407. .TP
  408. .B TAR_ATIME
  409. Time of last access. It is a decimal number, representing seconds
  410. since the Epoch. If the archive provides times with nanosecond
  411. precision, the nanoseconds are appended to the timestamp after a
  412. decimal point.
  413. .TP
  414. .B TAR_MTIME
  415. Time of last modification.
  416. .TP
  417. .B TAR_CTIME
  418. Time of last status change.
  419. .TP
  420. .B TAR_SIZE
  421. Size of the file.
  422. .TP
  423. .B TAR_UID
  424. UID of the file owner.
  425. .TP
  426. .B TAR_GID
  427. GID of the file owner.
  428. .RE
  429. .RS
  430. Additionally, the following variables contain information about
  431. \fBtar\fR operation mode and the archive being processed:
  432. .TP
  433. .B TAR_VERSION
  434. GNU \fBtar\fR version number.
  435. .TP
  436. .B TAR_ARCHIVE
  437. The name of the archive \fBtar\fR is processing.
  438. .TP
  439. .B TAR_BLOCKING_FACTOR
  440. Current blocking factor, i.e. number of 512-byte blocks in a record.
  441. .TP
  442. .B TAR_VOLUME
  443. Ordinal number of the volume \fBtar\fR is processing (set if
  444. reading a multi-volume archive).
  445. .TP
  446. .B TAR_FORMAT
  447. Format of the archive being processed. One of:
  448. .BR gnu ,
  449. .BR oldgnu ,
  450. .BR posix ,
  451. .BR ustar ,
  452. .BR v7 .
  453. .B TAR_SUBCOMMAND
  454. A short option (with a leading dash) describing the operation \fBtar\fR is
  455. executing.
  456. .RE
  457. .SS Handling of file attributes
  458. .TP
  459. \fB\-\-atime\-preserve\fR[=\fIMETHOD\fR]
  460. Preserve access times on dumped files, either by restoring the times
  461. after reading (\fIMETHOD\fR=\fBreplace\fR, this is the default) or by
  462. not setting the times in the first place (\fIMETHOD\fR=\fBsystem\fR)
  463. .TP
  464. \fB\-\-delay\-directory\-restore\fR
  465. Delay setting modification times and permissions of extracted
  466. directories until the end of extraction. Use this option when
  467. extracting from an archive which has unusual member ordering.
  468. .TP
  469. \fB\-\-group\fR=\fINAME\fR[:\fIGID\fR]
  470. Force \fINAME\fR as group for added files. If \fIGID\fR is not
  471. supplied, \fINAME\fR can be either a user name or numeric GID. In
  472. this case the missing part (GID or name) will be inferred from the
  473. current host's group database.
  474. When used with \fB\-\-group\-map\fR=\fIFILE\fR, affects only those
  475. files whose owner group is not listed in \fIFILE\fR.
  476. .TP
  477. \fB\-\-group\-map\fR=\fIFILE\fR
  478. Read group translation map from \fIFILE\fR. Empty lines are ignored.
  479. Comments are introduced with \fB#\fR sign and extend to the end of line.
  480. Each non-empty line in \fIFILE\fR defines translation for a single
  481. group. It must consist of two fields, delimited by any amount of whitespace:
  482. .EX
  483. \fIOLDGRP\fR \fINEWGRP\fR[\fB:\fINEWGID\fR]
  484. .EE
  485. \fIOLDGRP\fR is either a valid group name or a GID prefixed with
  486. \fB+\fR. Unless \fINEWGID\fR is supplied, \fINEWGRP\fR must also be
  487. either a valid group name or a \fB+\fIGID\fR. Otherwise, both
  488. \fINEWGRP\fR and \fINEWGID\fR need not be listed in the system group
  489. database.
  490. As a result, each input file with owner group \fIOLDGRP\fR will be
  491. stored in archive with owner group \fINEWGRP\fR and GID \fINEWGID\fR.
  492. .TP
  493. \fB\-\-mode\fR=\fICHANGES\fR
  494. Force symbolic mode \fICHANGES\fR for added files.
  495. .TP
  496. \fB\-\-mtime\fR=\fIDATE-OR-FILE\fR
  497. Set mtime for added files. \fIDATE-OR-FILE\fR is either a date/time
  498. in almost arbitrary format, or the name of an existing file. In the
  499. latter case the mtime of that file will be used.
  500. .TP
  501. \fB\-m\fR, \fB\-\-touch\fR
  502. Don't extract file modified time.
  503. .TP
  504. \fB\-\-no\-delay\-directory\-restore\fR
  505. Cancel the effect of the prior \fB\-\-delay\-directory\-restore\fR option.
  506. .TP
  507. \fB\-\-no\-same\-owner\fR
  508. Extract files as yourself (default for ordinary users).
  509. .TP
  510. \fB\-\-no\-same\-permissions\fR
  511. Apply the user's umask when extracting permissions from the archive
  512. (default for ordinary users).
  513. .TP
  514. \fB\-\-numeric\-owner\fR
  515. Always use numbers for user/group names.
  516. .TP
  517. \fB\-\-owner\fR=\fINAME\fR[:\fIUID\fR]
  518. Force \fINAME\fR as owner for added files. If \fIUID\fR is not
  519. supplied, \fINAME\fR can be either a user name or numeric UID. In
  520. this case the missing part (UID or name) will be inferred from the
  521. current host's user database.
  522. When used with \fB\-\-owner\-map\fR=\fIFILE\fR, affects only those
  523. files whose owner is not listed in \fIFILE\fR.
  524. .TP
  525. \fB\-\-owner\-map\fR=\fIFILE\fR
  526. Read owner translation map from \fIFILE\fR. Empty lines are ignored.
  527. Comments are introduced with \fB#\fR sign and extend to the end of line.
  528. Each non-empty line in \fIFILE\fR defines translation for a single
  529. UID. It must consist of two fields, delimited by any amount of whitespace:
  530. .EX
  531. \fIOLDUSR\fR \fINEWUSR\fR[\fB:\fINEWUID\fR]
  532. .EE
  533. \fIOLDUSR\fR is either a valid user name or a UID prefixed with
  534. \fB+\fR. Unless \fINEWUID\fR is supplied, \fINEWUSR\fR must also be
  535. either a valid user name or a \fB+\fIUID\fR. Otherwise, both
  536. \fINEWUSR\fR and \fINEWUID\fR need not be listed in the system user
  537. database.
  538. As a result, each input file owned by \fIOLDUSR\fR will be
  539. stored in archive with owner name \fINEWUSR\fR and UID \fINEWUID\fR.
  540. .TP
  541. \fB\-p\fR, \fB\-\-preserve\-permissions\fR, \fB\-\-same\-permissions\fR
  542. extract information about file permissions (default for superuser)
  543. .TP
  544. \fB\-\-preserve\fR
  545. Same as both \fB\-p\fR and \fB\-s\fR.
  546. .TP
  547. \fB\-\-same\-owner\fR
  548. Try extracting files with the same ownership as exists in the archive
  549. (default for superuser).
  550. .TP
  551. \fB\-s\fR, \fB\-\-preserve\-order\fR, \fB\-\-same\-order\fR
  552. Sort names to extract to match archive
  553. .TP
  554. \fB\-\-sort=\fIORDER\fR
  555. When creating an archive, sort directory entries according to
  556. \fIORDER\fR, which is one of
  557. .BR none ,
  558. .BR name ", or"
  559. .BR inode .
  560. The default is \fB\-\-sort=none\fR, which stores archive members in
  561. the same order as returned by the operating system.
  562. Using \fB\-\-sort=name\fR ensures the member ordering in the created archive
  563. is uniform and reproducible.
  564. Using \fB\-\-sort=inode\fR reduces the number of disk seeks made when
  565. creating the archive and thus can considerably speed up archivation.
  566. This sorting order is supported only if the underlying system provides
  567. the necessary information.
  568. .SS Device selection and switching
  569. .TP
  570. \fB\-f\fR, \fB\-\-file\fR=\fIARCHIVE\fR
  571. Use archive file or device \fIARCHIVE\fR. If this option is not
  572. given, \fBtar\fR will first examine the environment variable `TAPE'.
  573. If it is set, its value will be used as the archive name. Otherwise,
  574. \fBtar\fR will assume the compiled-in default. The default
  575. value can be inspected either using the
  576. .B \-\-show\-defaults
  577. option, or at the end of the \fBtar \-\-help\fR output.
  578. An archive name that has a colon in it specifies a file or device on a
  579. remote machine. The part before the colon is taken as the machine
  580. name or IP address, and the part after it as the file or device
  581. pathname, e.g.:
  582. .EX
  583. --file=remotehost:/dev/sr0
  584. .EE
  585. An optional username can be prefixed to the hostname, placing a \fB@\fR
  586. sign between them.
  587. By default, the remote host is accessed via the
  588. .BR rsh (1)
  589. command. Nowadays it is common to use
  590. .BR ssh (1)
  591. instead. You can do so by giving the following command line option:
  592. .EX
  593. --rsh-command=/usr/bin/ssh
  594. .EE
  595. The remote machine should have the
  596. .BR rmt (8)
  597. command installed. If its pathname does not match \fBtar\fR's
  598. default, you can inform \fBtar\fR about the correct pathname using the
  599. .B \-\-rmt\-command
  600. option.
  601. .TP
  602. \fB\-\-force\-local\fR
  603. Archive file is local even if it has a colon.
  604. .TP
  605. \fB\-F\fR, \fB\-\-info\-script\fR=\fICOMMAND\fR, \fB\-\-new\-volume\-script\fR=\fICOMMAND\fR
  606. Run \fICOMMAND\fR at the end of each tape (implies \fB\-M\fR). The
  607. command can include arguments. When started, it will inherit \fBtar\fR's
  608. environment plus the following variables:
  609. .RS
  610. .TP
  611. .B TAR_VERSION
  612. GNU \fBtar\fR version number.
  613. .TP
  614. .B TAR_ARCHIVE
  615. The name of the archive \fBtar\fR is processing.
  616. .TP
  617. .B TAR_BLOCKING_FACTOR
  618. Current blocking factor, i.e. number of 512-byte blocks in a record.
  619. .TP
  620. .B TAR_VOLUME
  621. Ordinal number of the volume \fBtar\fR is processing (set if
  622. reading a multi-volume archive).
  623. .TP
  624. .B TAR_FORMAT
  625. Format of the archive being processed. One of:
  626. .BR gnu ,
  627. .BR oldgnu ,
  628. .BR posix ,
  629. .BR ustar ,
  630. .BR v7 .
  631. .TP
  632. .B TAR_SUBCOMMAND
  633. A short option (with a leading dash) describing the operation \fBtar\fR is
  634. executing.
  635. .TP
  636. .B TAR_FD
  637. File descriptor which can be used to communicate the new volume name
  638. to
  639. .BR tar .
  640. .RE
  641. .RS
  642. If the info script fails, \fBtar\fR exits; otherwise, it begins writing
  643. the next volume.
  644. .RE
  645. .TP
  646. \fB\-L\fR, \fB\-\-tape\-length\fR=\fIN\fR
  647. Change tape after writing \fIN\fRx1024 bytes. If \fIN\fR is followed
  648. by a size suffix (see the subsection
  649. .B Size suffixes
  650. below), the suffix specifies the multiplicative factor to be used
  651. instead of 1024.
  652. This option implies
  653. .BR \-M .
  654. .TP
  655. \fB\-M\fR, \fB\-\-multi\-volume\fR
  656. Create/list/extract multi-volume archive.
  657. .TP
  658. \fB\-\-rmt\-command\fR=\fICOMMAND\fR
  659. Use \fICOMMAND\fR instead of \fBrmt\fR when accessing remote
  660. archives. See the description of the
  661. .B \-f
  662. option, above.
  663. .TP
  664. \fB\-\-rsh\-command\fR=\fICOMMAND\fR
  665. Use \fICOMMAND\fR instead of \fBrsh\fR when accessing remote
  666. archives. See the description of the
  667. .B \-f
  668. option, above.
  669. .TP
  670. \fB\-\-volno\-file\fR=\fIFILE\fR
  671. When this option is used in conjunction with
  672. .BR \-\-multi\-volume ,
  673. .B tar
  674. will keep track of which volume of a multi-volume archive it is
  675. working in \fIFILE\fR.
  676. .SS Device blocking
  677. .TP
  678. \fB\-b\fR, \fB\-\-blocking\-factor\fR=\fIBLOCKS\fR
  679. Set record size to \fIBLOCKS\fRx\fB512\fR bytes.
  680. .TP
  681. \fB\-B\fR, \fB\-\-read\-full\-records\fR
  682. When listing or extracting, accept incomplete input records after
  683. end-of-file marker.
  684. .TP
  685. \fB\-i\fR, \fB\-\-ignore\-zeros\fR
  686. Ignore zeroed blocks in archive. Normally two consecutive 512-blocks
  687. filled with zeroes mean EOF and tar stops reading after encountering
  688. them. This option instructs it to read further and is useful when
  689. reading archives created with the \fB\-A\fR option.
  690. .TP
  691. \fB\-\-record\-size\fR=\fINUMBER\fR
  692. Set record size. \fINUMBER\fR is the number of bytes per record. It
  693. must be multiple of \fB512\fR. It can can be suffixed with a \fBsize
  694. suffix\fR, e.g. \fB\-\-record-size=10K\fR, for 10 Kilobytes. See the
  695. subsection
  696. .BR "Size suffixes" ,
  697. for a list of valid suffixes.
  698. .SS Archive format selection
  699. .TP
  700. \fB\-H\fR, \fB\-\-format\fR=\fIFORMAT\fR
  701. Create archive of the given format. Valid formats are:
  702. .RS
  703. .TP
  704. .B gnu
  705. GNU tar 1.13.x format
  706. .TP
  707. .B oldgnu
  708. GNU format as per tar <= 1.12.
  709. .TP
  710. \fBpax\fR, \fBposix\fR
  711. POSIX 1003.1-2001 (pax) format.
  712. .TP
  713. .B ustar
  714. POSIX 1003.1-1988 (ustar) format.
  715. .TP
  716. .B v7
  717. Old V7 tar format.
  718. .RE
  719. .TP
  720. \fB\-\-old\-archive\fR, \fB\-\-portability\fR
  721. Same as \fB\-\-format=v7\fR.
  722. .TP
  723. \fB\-\-pax\-option\fR=\fIkeyword\fR[[:]=\fIvalue\fR][,\fIkeyword\fR[[:]=\fIvalue\fR]]...
  724. Control pax keywords when creating \fBPAX\fR archives (\fB\-H
  725. pax\fR). This option is equivalent to the \fB\-o\fR option of the
  726. .BR pax (1) utility.
  727. .TP
  728. \fB\-\-posix\fR
  729. Same as \fB\-\-format=posix\fR.
  730. .TP
  731. \fB\-V\fR, \fB\-\-label\fR=\fITEXT\fR
  732. Create archive with volume name \fITEXT\fR. If listing or extracting,
  733. use \fITEXT\fR as a globbing pattern for volume name.
  734. .SS Compression options
  735. .TP
  736. \fB\-a\fR, \fB\-\-auto\-compress\fR
  737. Use archive suffix to determine the compression program.
  738. .TP
  739. \fB\-I\fR, \fB\-\-use\-compress\-program\fI=\fICOMMAND\fR
  740. Filter data through \fICOMMAND\fR. It must accept the \fB\-d\fR
  741. option, for decompression. The argument can contain command line
  742. options.
  743. .TP
  744. \fB\-j\fR, \fB\-\-bzip2\fR
  745. Filter the archive through
  746. .BR bzip2 (1).
  747. .TP
  748. \fB\-J\fR, \fB\-\-xz\fR
  749. Filter the archive through
  750. .BR xz (1).
  751. .TP
  752. \fB\-\-lzip\fR
  753. Filter the archive through
  754. .BR lzip (1).
  755. .TP
  756. \fB\-\-lzma\fR
  757. Filter the archive through
  758. .BR lzma (1).
  759. .TP
  760. \fB\-\-lzop\fR
  761. Filter the archive through
  762. .BR lzop (1).
  763. .TP
  764. \fB\-\-no\-auto\-compress\fR
  765. Do not use archive suffix to determine the compression program.
  766. .TP
  767. \fB\-z\fR, \fB\-\-gzip\fR, \fB\-\-gunzip\fR, \fB\-\-ungzip\fR
  768. Filter the archive through
  769. .BR gzip (1).
  770. .TP
  771. \fB\-Z\fR, \fB\-\-compress\fR, \fB\-\-uncompress\fR
  772. Filter the archive through
  773. .BR compress (1).
  774. .SS Local file selection
  775. .TP
  776. \fB\-\-add\-file\fR=\fIFILE\fR
  777. Add \fIFILE\fR to the archive (useful if its name starts with a dash).
  778. .TP
  779. \fB\-\-backup\fR[=\fICONTROL\fR]
  780. Backup before removal. The \fICONTROL\fR argument, if supplied,
  781. controls the backup policy. Its valid values are:
  782. .RS
  783. .TP
  784. .BR none ", " off
  785. Never make backups.
  786. .TP
  787. .BR t ", " numbered
  788. Make numbered backups.
  789. .TP
  790. .BR nil ", " existing
  791. Make numbered backups if numbered backups exist, simple backups otherwise.
  792. .TP
  793. .BR never ", " simple
  794. Always make simple backups
  795. .RS
  796. .RE
  797. If \fICONTROL\fR is not given, the value is taken from the
  798. .B VERSION_CONTROL
  799. environment variable. If it is not set, \fBexisting\fR is assumed.
  800. .RE
  801. .TP
  802. \fB\-C\fR, \fB\-\-directory\fR=\fIDIR\fR
  803. Change to \fIDIR\fR before performing any operations. This option is
  804. order-sensitive, i.e. it affects all options that follow.
  805. .TP
  806. \fB\-\-exclude\fR=\fIPATTERN\fR
  807. Exclude files matching \fIPATTERN\fR, a
  808. .BR glob (3)-style
  809. wildcard pattern.
  810. .TP
  811. \fB\-\-exclude\-backups\fR
  812. Exclude backup and lock files.
  813. .TP
  814. \fB\-\-exclude\-caches\fR
  815. Exclude contents of directories containing file \fBCACHEDIR.TAG\fR,
  816. except for the tag file itself.
  817. .TP
  818. \fB\-\-exclude\-caches\-all\fR
  819. Exclude directories containing file \fBCACHEDIR.TAG\fR and the file itself.
  820. .TP
  821. \fB\-\-exclude\-caches\-under\fR
  822. Exclude everything under directories containing \fBCACHEDIR.TAG\fR
  823. .TP
  824. \fB\-\-exclude\-ignore=\fIFILE\fR
  825. Before dumping a directory, see if it contains \fIFILE\fR.
  826. If so, read exclusion patterns from this file. The patterns affect
  827. only the directory itself.
  828. .TP
  829. \fB\-\-exclude\-ignore\-recursive=\fIFILE\fR
  830. Same as \fB\-\-exclude\-ignore\fR, except that patterns from
  831. \fIFILE\fR affect both the directory and all its subdirectories.
  832. .TP
  833. \fB\-\-exclude\-tag\fR=\fIFILE\fR
  834. Exclude contents of directories containing \fIFILE\fR, except for
  835. \fIFILE\fR itself.
  836. .TP
  837. \fB\-\-exclude\-tag\-all\fR=\fIFILE\fR
  838. Exclude directories containing \fIFILE\fR.
  839. .TP
  840. \fB\-\-exclude\-tag\-under\fR=\fIFILE\fR
  841. Exclude everything under directories containing \fIFILE\fR.
  842. .TP
  843. \fB\-\-exclude\-vcs\fR
  844. Exclude version control system directories.
  845. .TP
  846. \fB\-\-exclude\-vcs\-ignores\fR
  847. Exclude files that match patterns read from VCS-specific ignore
  848. files. Supported files are:
  849. .BR .cvsignore ,
  850. .BR .gitignore ,
  851. .BR .bzrignore ", and"
  852. .BR .hgignore .
  853. .TP
  854. \fB\-h\fR, \fB\-\-dereference\fR
  855. Follow symlinks; archive and dump the files they point to.
  856. .TP
  857. \fB\-\-hard\-dereference\fR
  858. Follow hard links; archive and dump the files they refer to.
  859. .TP
  860. \fB\-K\fR, \fB\-\-starting\-file\fR=\fIMEMBER\fR
  861. Begin at the given member in the archive.
  862. .TP
  863. \fB\-\-newer\-mtime\fR=\fIDATE\fR
  864. Work on files whose data changed after the \fIDATE\fR. If \fIDATE\fR
  865. starts with \fB/\fR or \fB.\fR it is taken to be a file name; the
  866. mtime of that file is used as the date.
  867. .TP
  868. \fB\-\-no\-null\fR
  869. Disable the effect of the previous \fB\-\-null\fR option.
  870. .TP
  871. \fB\-\-no\-recursion\fR
  872. Avoid descending automatically in directories.
  873. .TP
  874. \fB\-\-no\-unquote\fR
  875. Do not unquote input file or member names.
  876. .TP
  877. \fB\-\-no\-verbatim\-files\-from\fR
  878. Treat each line read from a file list as if it were supplied in the
  879. command line. I.e., leading and trailing whitespace is removed and,
  880. if the resulting string begins with a dash, it is treated as \fBtar\fR
  881. command line option.
  882. This is the default behavior. The \fB\-\-no\-verbatim\-files\-from\fR
  883. option is provided as a way to restore it after
  884. \fB\-\-verbatim\-files\-from\fR option.
  885. This option is positional: it affects all \fB\-\-files\-from\fR
  886. options that occur after it in, until \fB\-\-verbatim\-files\-from\fR
  887. option or end of line, whichever occurs first.
  888. It is implied by the \fB\-\-no\-null\fR option.
  889. .TP
  890. \fB\-\-null\fR
  891. Instruct subsequent \fB\-T\fR options to read null-terminated names
  892. verbatim (disables special handling of names that start with a dash).
  893. See also \fB\-\-verbatim\-files\-from\fR.
  894. .TP
  895. \fB\-N\fR, \fB\-\-newer\fR=\fIDATE\fR, \fB\-\-after\-date\fR=\fIDATE\fR
  896. Only store files newer than DATE. If \fIDATE\fR starts with \fB/\fR
  897. or \fB.\fR it is taken to be a file name; the ctime of that file is
  898. used as the date.
  899. .TP
  900. \fB\-\-one\-file\-system\fR
  901. Stay in local file system when creating archive.
  902. .TP
  903. \fB\-P\fR, \fB\-\-absolute\-names\fR
  904. Don't strip leading slashes from file names when creating archives.
  905. .TP
  906. \fB\-\-recursion\fR
  907. Recurse into directories (default).
  908. .TP
  909. \fB\-\-suffix\fR=\fISTRING\fR
  910. Backup before removal, override usual suffix. Default suffix is \fB~\fR,
  911. unless overridden by environment variable \fBSIMPLE_BACKUP_SUFFIX\fR.
  912. .TP
  913. \fB\-T\fR, \fB\-\-files\-from\fR=\fIFILE\fR
  914. Get names to extract or create from \fIFILE\fR.
  915. Unless specified otherwise, the \fIFILE\fR must contain a list of
  916. names separated by ASCII \fBLF\fR (i.e. one name per line). The
  917. names read are handled the same way as command line arguments. They
  918. undergo quote removal and word splitting, and any string that starts
  919. with a \fB\-\fR is handled as \fBtar\fR command line option.
  920. If this behavior is undesirable, it can be turned off using the
  921. \fB\-\-verbatim\-files\-from\fR option.
  922. The \fB\-\-null\fR option instructs \fBtar\fR that the names in
  923. \fIFILE\fR are separated by ASCII \fBNUL\fR character, instead of
  924. \fBLF\fR. It is useful if the list is generated by
  925. .BR find (1)
  926. .B \-print0
  927. predicate.
  928. .TP
  929. \fB\-\-unquote\fR
  930. Unquote file or member names (default).
  931. .TP
  932. \fB\-\-verbatim\-files\-from\fR
  933. Treat each line obtained from a file list as a file name, even if it
  934. starts with a dash. File lists are supplied with the
  935. \fB\-\-files\-from\fR (\fB\-T\fR) option. The default behavior is to
  936. handle names supplied in file lists as if they were typed in the
  937. command line, i.e. any names starting with a dash are treated as
  938. \fBtar\fR options. The \fB\-\-verbatim\-files\-from\fR option
  939. disables this behavior.
  940. This option affects all \fB\-\-files\-from\fR options that occur after
  941. it in the command line. Its effect is reverted by the
  942. \fB\-\-no\-verbatim\-files\-from} option.
  943. This option is implied by the \fB\-\-null\fR option.
  944. See also \fB\-\-add\-file\fR.
  945. .TP
  946. \fB\-X\fR, \fB\-\-exclude\-from\fR=\fIFILE\fR
  947. Exclude files matching patterns listed in FILE.
  948. .SS File name transformations
  949. .TP
  950. \fB\-\-strip\-components\fR=\fINUMBER\fR
  951. Strip \fINUMBER\fR leading components from file names on extraction.
  952. .TP
  953. \fB\-\-transform\fR=\fIEXPRESSION\fR, \fB\-\-xform\fR=\fIEXPRESSION\fR
  954. Use sed replace \fIEXPRESSION\fR to transform file names.
  955. .SS File name matching options
  956. These options affect both exclude and include patterns.
  957. .TP
  958. \fB\-\-anchored\fR
  959. Patterns match file name start.
  960. .TP
  961. \fB\-\-ignore\-case\fR
  962. Ignore case.
  963. .TP
  964. \fB\-\-no\-anchored\fR
  965. Patterns match after any \fB/\fR (default for exclusion).
  966. .TP
  967. \fB\-\-no\-ignore\-case\fR
  968. Case sensitive matching (default).
  969. .TP
  970. \fB\-\-no\-wildcards\fR
  971. Verbatim string matching.
  972. .TP
  973. \fB\-\-no\-wildcards\-match\-slash\fR
  974. Wildcards do not match \fB/\fR.
  975. .TP
  976. \fB\-\-wildcards\fR
  977. Use wildcards (default for exclusion).
  978. .TP
  979. \fB\-\-wildcards\-match\-slash\fR
  980. Wildcards match \fB/\fR (default for exclusion).
  981. .SS Informative output
  982. .TP
  983. \fB\-\-checkpoint\fR[=\fIN\fR]
  984. Display progress messages every \fIN\fRth record (default 10).
  985. .TP
  986. \fB\-\-checkpoint\-action\fR=\fIACTION\fR
  987. Run \fIACTION\fR on each checkpoint.
  988. .TP
  989. \fB\-\-full\-time\fR
  990. Print file time to its full resolution.
  991. .TP
  992. \fB\-\-index\-file\fR=\fIFILE\fR
  993. Send verbose output to \fIFILE\fR.
  994. .TP
  995. \fB\-l\fR, \fB\-\-check\-links\fR
  996. Print a message if not all links are dumped.
  997. .TP
  998. \fB\-\-no\-quote\-chars\fR=\fISTRING\fR
  999. Disable quoting for characters from \fISTRING\fR.
  1000. .TP
  1001. \fB\-\-quote\-chars\fR=\fISTRING\fR
  1002. Additionally quote characters from \fISTRING\fR.
  1003. .TP
  1004. \fB\-\-quoting\-style\fR=\fISTYLE\fR
  1005. Set quoting style for file and member names. Valid values for
  1006. \fISTYLE\fR are
  1007. .BR literal ,
  1008. .BR shell ,
  1009. .BR shell-always ,
  1010. .BR c ,
  1011. .BR c-maybe ,
  1012. .BR escape ,
  1013. .BR locale ,
  1014. .BR clocale .
  1015. .TP
  1016. \fB\-R\fR, \fB\-\-block\-number\fR
  1017. Show block number within archive with each message.
  1018. .TP
  1019. \fB\-\-show\-omitted\-dirs\fR
  1020. When listing or extracting, list each directory that does not match
  1021. search criteria.
  1022. .TP
  1023. \fB\-\-show\-transformed\-names\fR, \fB\-\-show\-stored\-names\fR
  1024. Show file or archive names after transformation by \fB\-\-strip\fR and
  1025. \fB\-\-transform\fR options.
  1026. .TP
  1027. \fB\-\-totals\fR[=\fISIGNAL\fR]
  1028. Print total bytes after processing the archive. If \fISIGNAL\fR is
  1029. given, print total bytes when this signal is delivered. Allowed
  1030. signals are:
  1031. .BR SIGHUP ,
  1032. .BR SIGQUIT ,
  1033. .BR SIGINT ,
  1034. .BR SIGUSR1 ", and"
  1035. .BR SIGUSR2 .
  1036. The \fBSIG\fR prefix can be omitted.
  1037. .TP
  1038. \fB\-\-utc\fR
  1039. Print file modification times in UTC.
  1040. .TP
  1041. \fB\-v\fR, \fB\-\-verbose\fR
  1042. Verbosely list files processed.
  1043. .TP
  1044. \fB\-\-warning\fR=\fIKEYWORD\fR
  1045. Enable or disable warning messages identified by \fIKEYWORD\fR. The
  1046. messages are suppressed if \fIKEYWORD\fR is prefixed with \fBno\-\fR
  1047. and enabled otherwise.
  1048. Multiple \fB\-\-warning\fR messages accumulate.
  1049. Keywords controlling general \fBtar\fR operation:
  1050. .RS
  1051. .TP
  1052. .B all
  1053. Enable all warning messages. This is the default.
  1054. .TP
  1055. .B none
  1056. Disable all warning messages.
  1057. .TP
  1058. .B filename-with-nuls
  1059. "%s: file name read contains nul character"
  1060. .TP
  1061. .B alone-zero-block
  1062. "A lone zero block at %s"
  1063. .HP
  1064. Keywords applicable for \fBtar --create\fR:
  1065. .TP
  1066. .B cachedir
  1067. "%s: contains a cache directory tag %s; %s"
  1068. .TP
  1069. .B file-shrank
  1070. "%s: File shrank by %s bytes; padding with zeros"
  1071. .TP
  1072. .B xdev
  1073. "%s: file is on a different filesystem; not dumped"
  1074. .TP
  1075. .B file-ignored
  1076. "%s: Unknown file type; file ignored"
  1077. .br
  1078. "%s: socket ignored"
  1079. .br
  1080. "%s: door ignored"
  1081. .TP
  1082. .B file-unchanged
  1083. "%s: file is unchanged; not dumped"
  1084. .TP
  1085. .B ignore-archive
  1086. "%s: file is the archive; not dumped"
  1087. .TP
  1088. .B file-removed
  1089. "%s: File removed before we read it"
  1090. .TP
  1091. .B file-changed
  1092. "%s: file changed as we read it"
  1093. .HP
  1094. Keywords applicable for \fBtar --extract\fR:
  1095. .TP
  1096. .B existing\-file
  1097. "%s: skipping existing file"
  1098. .TP
  1099. .B timestamp
  1100. "%s: implausibly old time stamp %s"
  1101. .br
  1102. "%s: time stamp %s is %s s in the future"
  1103. .TP
  1104. .B contiguous-cast
  1105. "Extracting contiguous files as regular files"
  1106. .TP
  1107. .B symlink-cast
  1108. "Attempting extraction of symbolic links as hard links"
  1109. .TP
  1110. .B unknown-cast
  1111. "%s: Unknown file type '%c', extracted as normal file"
  1112. .TP
  1113. .B ignore-newer
  1114. "Current %s is newer or same age"
  1115. .TP
  1116. .B unknown-keyword
  1117. "Ignoring unknown extended header keyword '%s'"
  1118. .TP
  1119. .B decompress-program
  1120. Controls verbose description of failures occurring when trying to run
  1121. alternative decompressor programs. This warning is disabled by
  1122. default (unless \fB\-\-verbose\fR is used). A common example of what
  1123. you can get when using this warning is:
  1124. .EX
  1125. $ \fBtar --warning=decompress-program -x -f archive.Z
  1126. tar (child): cannot run compress: No such file or directory
  1127. tar (child): trying gzip
  1128. .EE
  1129. This means that \fBtar\fR first tried to decompress
  1130. \fBarchive.Z\fR using \fBcompress\fR, and, when that
  1131. failed, switched to \fBgzip\fR.
  1132. .TP
  1133. .B record-size
  1134. "Record size = %lu blocks"
  1135. .HP
  1136. Keywords controlling incremental extraction:
  1137. .TP
  1138. .B rename-directory
  1139. "%s: Directory has been renamed from %s"
  1140. .br
  1141. "%s: Directory has been renamed"
  1142. .TP
  1143. .B new-directory
  1144. "%s: Directory is new"
  1145. .TP
  1146. .B xdev
  1147. "%s: directory is on a different device: not purging"
  1148. .TP
  1149. .B bad-dumpdir
  1150. "Malformed dumpdir: 'X' never used"
  1151. .RE
  1152. .TP
  1153. \fB\-w\fR, \fB\-\-interactive\fR, \fB\-\-confirmation\fR
  1154. Ask for confirmation for every action.
  1155. .SS Compatibility options
  1156. .TP
  1157. \fB\-o\fR
  1158. When creating, same as \fB\-\-old\-archive\fR. When extracting, same
  1159. as \fB\-\-no\-same\-owner\fR.
  1160. .SS Size suffixes
  1161. .sp
  1162. .nf
  1163. .ta 8n 18n 42n
  1164. .ul
  1165. Suffix Units Byte Equivalent
  1166. b Blocks \fISIZE\fR x 512
  1167. B Kilobytes \fISIZE\fR x 1024
  1168. c Bytes \fISIZE\fR
  1169. G Gigabytes \fISIZE\fR x 1024^3
  1170. K Kilobytes \fISIZE\fR x 1024
  1171. k Kilobytes \fISIZE\fR x 1024
  1172. M Megabytes \fISIZE\fR x 1024^2
  1173. P Petabytes \fISIZE\fR x 1024^5
  1174. T Terabytes \fISIZE\fR x 1024^4
  1175. w Words \fISIZE\fR x 2
  1176. .fi
  1177. .PP
  1178. .SH "RETURN VALUE"
  1179. Tar exit code indicates whether it was able to successfully perform
  1180. the requested operation, and if not, what kind of error occurred.
  1181. .TP
  1182. .B 0
  1183. Successful termination.
  1184. .TP
  1185. .B 1
  1186. .I Some files differ.
  1187. If tar was invoked with the \fB\-\-compare\fR (\fB\-\-diff\fR, \fB\-d\fR)
  1188. command line option, this means that some files in the archive differ
  1189. from their disk counterparts. If tar was given one of the \fB\-\-create\fR,
  1190. \fB\-\-append\fR or \fB\-\-update\fR options, this exit code means
  1191. that some files were changed while being archived and so the resulting
  1192. archive does not contain the exact copy of the file set.
  1193. .TP
  1194. .B 2
  1195. .I Fatal error.
  1196. This means that some fatal, unrecoverable error occurred.
  1197. .PP
  1198. If a subprocess that had been invoked by
  1199. .B tar
  1200. exited with a nonzero exit code,
  1201. .B tar
  1202. itself exits with that code as well. This can happen, for example, if
  1203. a compression option (e.g. \fB\-z\fR) was used and the external
  1204. compressor program failed. Another example is
  1205. .B rmt
  1206. failure during backup to a remote device.
  1207. .SH "SEE ALSO"
  1208. .BR bzip2 (1),
  1209. .BR compress (1),
  1210. .BR gzip (1),
  1211. .BR lzma (1),
  1212. .BR lzop (1),
  1213. .BR rmt (8),
  1214. .BR symlink (7),
  1215. .BR tar (5),
  1216. .BR xz (1).
  1217. .PP
  1218. Complete \fBtar\fR manual: run
  1219. .B info tar
  1220. or use
  1221. .BR emacs (1)
  1222. info mode to read it.
  1223. .PP
  1224. Online copies of \fBGNU tar\fR documentation in various formats can be
  1225. found at:
  1226. .PP
  1227. .in +4
  1228. .B http://www.gnu.org/software/tar/manual
  1229. .SH "BUG REPORTS"
  1230. Report bugs to <bug\[email protected]>.
  1231. .SH COPYRIGHT
  1232. Copyright \(co 2013 Free Software Foundation, Inc.
  1233. .br
  1234. .na
  1235. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  1236. .br
  1237. .ad
  1238. This is free software: you are free to change and redistribute it.
  1239. There is NO WARRANTY, to the extent permitted by law.
  1240. .\" Local variables:
  1241. .\" eval: (add-hook 'write-file-hooks 'time-stamp)
  1242. .\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.\\-]* [0-9] \""
  1243. .\" time-stamp-format: "%:B %:d, %:y"
  1244. .\" time-stamp-end: "\""
  1245. .\" time-stamp-line-limit: 20
  1246. .\" end: