tar.1 39 KB

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