tar.1 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319
  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 "March 23, 2016" "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 Extended file attributes
  569. .TP
  570. .B \-\-acls
  571. Enable POSIX ACLs support.
  572. .TP
  573. .B \-\-no\-acls
  574. Disable POSIX ACLs support.
  575. .TP
  576. .B \-\-selinux
  577. Enable SELinux context support.
  578. .TP
  579. .B \-\-no-selinux
  580. Disable SELinux context support.
  581. .TP
  582. .B \-\-xattrs
  583. Enable extended attributes support.
  584. .TP
  585. .B \-\-no\-xattrs
  586. Disable extended attributes support.
  587. .TP
  588. .BI \-\-xattrs\-exclude= PATTERN
  589. Specify the exclude pattern for xattr keys. \fIPATTERN\fR is a POSIX
  590. regular expression, e.g. \fB\-\-xattrs\-exclude='^user\.'\fR, to exclude
  591. attributes from the user namespace.
  592. .TP
  593. .BI \-\-xattrs\-include= PATTERN
  594. Specify the include pattern for xattr keys. \fIPATTERN\fR is a POSIX
  595. regular expression.
  596. .SS Device selection and switching
  597. .TP
  598. \fB\-f\fR, \fB\-\-file\fR=\fIARCHIVE\fR
  599. Use archive file or device \fIARCHIVE\fR. If this option is not
  600. given, \fBtar\fR will first examine the environment variable `TAPE'.
  601. If it is set, its value will be used as the archive name. Otherwise,
  602. \fBtar\fR will assume the compiled-in default. The default
  603. value can be inspected either using the
  604. .B \-\-show\-defaults
  605. option, or at the end of the \fBtar \-\-help\fR output.
  606. An archive name that has a colon in it specifies a file or device on a
  607. remote machine. The part before the colon is taken as the machine
  608. name or IP address, and the part after it as the file or device
  609. pathname, e.g.:
  610. .EX
  611. --file=remotehost:/dev/sr0
  612. .EE
  613. An optional username can be prefixed to the hostname, placing a \fB@\fR
  614. sign between them.
  615. By default, the remote host is accessed via the
  616. .BR rsh (1)
  617. command. Nowadays it is common to use
  618. .BR ssh (1)
  619. instead. You can do so by giving the following command line option:
  620. .EX
  621. --rsh-command=/usr/bin/ssh
  622. .EE
  623. The remote machine should have the
  624. .BR rmt (8)
  625. command installed. If its pathname does not match \fBtar\fR's
  626. default, you can inform \fBtar\fR about the correct pathname using the
  627. .B \-\-rmt\-command
  628. option.
  629. .TP
  630. \fB\-\-force\-local\fR
  631. Archive file is local even if it has a colon.
  632. .TP
  633. \fB\-F\fR, \fB\-\-info\-script\fR=\fICOMMAND\fR, \fB\-\-new\-volume\-script\fR=\fICOMMAND\fR
  634. Run \fICOMMAND\fR at the end of each tape (implies \fB\-M\fR). The
  635. command can include arguments. When started, it will inherit \fBtar\fR's
  636. environment plus the following variables:
  637. .RS
  638. .TP
  639. .B TAR_VERSION
  640. GNU \fBtar\fR version number.
  641. .TP
  642. .B TAR_ARCHIVE
  643. The name of the archive \fBtar\fR is processing.
  644. .TP
  645. .B TAR_BLOCKING_FACTOR
  646. Current blocking factor, i.e. number of 512-byte blocks in a record.
  647. .TP
  648. .B TAR_VOLUME
  649. Ordinal number of the volume \fBtar\fR is processing (set if
  650. reading a multi-volume archive).
  651. .TP
  652. .B TAR_FORMAT
  653. Format of the archive being processed. One of:
  654. .BR gnu ,
  655. .BR oldgnu ,
  656. .BR posix ,
  657. .BR ustar ,
  658. .BR v7 .
  659. .TP
  660. .B TAR_SUBCOMMAND
  661. A short option (with a leading dash) describing the operation \fBtar\fR is
  662. executing.
  663. .TP
  664. .B TAR_FD
  665. File descriptor which can be used to communicate the new volume name
  666. to
  667. .BR tar .
  668. .RE
  669. .RS
  670. If the info script fails, \fBtar\fR exits; otherwise, it begins writing
  671. the next volume.
  672. .RE
  673. .TP
  674. \fB\-L\fR, \fB\-\-tape\-length\fR=\fIN\fR
  675. Change tape after writing \fIN\fRx1024 bytes. If \fIN\fR is followed
  676. by a size suffix (see the subsection
  677. .B Size suffixes
  678. below), the suffix specifies the multiplicative factor to be used
  679. instead of 1024.
  680. This option implies
  681. .BR \-M .
  682. .TP
  683. \fB\-M\fR, \fB\-\-multi\-volume\fR
  684. Create/list/extract multi-volume archive.
  685. .TP
  686. \fB\-\-rmt\-command\fR=\fICOMMAND\fR
  687. Use \fICOMMAND\fR instead of \fBrmt\fR when accessing remote
  688. archives. See the description of the
  689. .B \-f
  690. option, above.
  691. .TP
  692. \fB\-\-rsh\-command\fR=\fICOMMAND\fR
  693. Use \fICOMMAND\fR instead of \fBrsh\fR when accessing remote
  694. archives. See the description of the
  695. .B \-f
  696. option, above.
  697. .TP
  698. \fB\-\-volno\-file\fR=\fIFILE\fR
  699. When this option is used in conjunction with
  700. .BR \-\-multi\-volume ,
  701. .B tar
  702. will keep track of which volume of a multi-volume archive it is
  703. working in \fIFILE\fR.
  704. .SS Device blocking
  705. .TP
  706. \fB\-b\fR, \fB\-\-blocking\-factor\fR=\fIBLOCKS\fR
  707. Set record size to \fIBLOCKS\fRx\fB512\fR bytes.
  708. .TP
  709. \fB\-B\fR, \fB\-\-read\-full\-records\fR
  710. When listing or extracting, accept incomplete input records after
  711. end-of-file marker.
  712. .TP
  713. \fB\-i\fR, \fB\-\-ignore\-zeros\fR
  714. Ignore zeroed blocks in archive. Normally two consecutive 512-blocks
  715. filled with zeroes mean EOF and tar stops reading after encountering
  716. them. This option instructs it to read further and is useful when
  717. reading archives created with the \fB\-A\fR option.
  718. .TP
  719. \fB\-\-record\-size\fR=\fINUMBER\fR
  720. Set record size. \fINUMBER\fR is the number of bytes per record. It
  721. must be multiple of \fB512\fR. It can can be suffixed with a \fBsize
  722. suffix\fR, e.g. \fB\-\-record-size=10K\fR, for 10 Kilobytes. See the
  723. subsection
  724. .BR "Size suffixes" ,
  725. for a list of valid suffixes.
  726. .SS Archive format selection
  727. .TP
  728. \fB\-H\fR, \fB\-\-format\fR=\fIFORMAT\fR
  729. Create archive of the given format. Valid formats are:
  730. .RS
  731. .TP
  732. .B gnu
  733. GNU tar 1.13.x format
  734. .TP
  735. .B oldgnu
  736. GNU format as per tar <= 1.12.
  737. .TP
  738. \fBpax\fR, \fBposix\fR
  739. POSIX 1003.1-2001 (pax) format.
  740. .TP
  741. .B ustar
  742. POSIX 1003.1-1988 (ustar) format.
  743. .TP
  744. .B v7
  745. Old V7 tar format.
  746. .RE
  747. .TP
  748. \fB\-\-old\-archive\fR, \fB\-\-portability\fR
  749. Same as \fB\-\-format=v7\fR.
  750. .TP
  751. \fB\-\-pax\-option\fR=\fIkeyword\fR[[:]=\fIvalue\fR][,\fIkeyword\fR[[:]=\fIvalue\fR]]...
  752. Control pax keywords when creating \fBPAX\fR archives (\fB\-H
  753. pax\fR). This option is equivalent to the \fB\-o\fR option of the
  754. .BR pax (1) utility.
  755. .TP
  756. \fB\-\-posix\fR
  757. Same as \fB\-\-format=posix\fR.
  758. .TP
  759. \fB\-V\fR, \fB\-\-label\fR=\fITEXT\fR
  760. Create archive with volume name \fITEXT\fR. If listing or extracting,
  761. use \fITEXT\fR as a globbing pattern for volume name.
  762. .SS Compression options
  763. .TP
  764. \fB\-a\fR, \fB\-\-auto\-compress\fR
  765. Use archive suffix to determine the compression program.
  766. .TP
  767. \fB\-I\fR, \fB\-\-use\-compress\-program\fI=\fICOMMAND\fR
  768. Filter data through \fICOMMAND\fR. It must accept the \fB\-d\fR
  769. option, for decompression. The argument can contain command line
  770. options.
  771. .TP
  772. \fB\-j\fR, \fB\-\-bzip2\fR
  773. Filter the archive through
  774. .BR bzip2 (1).
  775. .TP
  776. \fB\-J\fR, \fB\-\-xz\fR
  777. Filter the archive through
  778. .BR xz (1).
  779. .TP
  780. \fB\-\-lzip\fR
  781. Filter the archive through
  782. .BR lzip (1).
  783. .TP
  784. \fB\-\-lzma\fR
  785. Filter the archive through
  786. .BR lzma (1).
  787. .TP
  788. \fB\-\-lzop\fR
  789. Filter the archive through
  790. .BR lzop (1).
  791. .TP
  792. \fB\-\-no\-auto\-compress\fR
  793. Do not use archive suffix to determine the compression program.
  794. .TP
  795. \fB\-z\fR, \fB\-\-gzip\fR, \fB\-\-gunzip\fR, \fB\-\-ungzip\fR
  796. Filter the archive through
  797. .BR gzip (1).
  798. .TP
  799. \fB\-Z\fR, \fB\-\-compress\fR, \fB\-\-uncompress\fR
  800. Filter the archive through
  801. .BR compress (1).
  802. .SS Local file selection
  803. .TP
  804. \fB\-\-add\-file\fR=\fIFILE\fR
  805. Add \fIFILE\fR to the archive (useful if its name starts with a dash).
  806. .TP
  807. \fB\-\-backup\fR[=\fICONTROL\fR]
  808. Backup before removal. The \fICONTROL\fR argument, if supplied,
  809. controls the backup policy. Its valid values are:
  810. .RS
  811. .TP
  812. .BR none ", " off
  813. Never make backups.
  814. .TP
  815. .BR t ", " numbered
  816. Make numbered backups.
  817. .TP
  818. .BR nil ", " existing
  819. Make numbered backups if numbered backups exist, simple backups otherwise.
  820. .TP
  821. .BR never ", " simple
  822. Always make simple backups
  823. .RS
  824. .RE
  825. If \fICONTROL\fR is not given, the value is taken from the
  826. .B VERSION_CONTROL
  827. environment variable. If it is not set, \fBexisting\fR is assumed.
  828. .RE
  829. .TP
  830. \fB\-C\fR, \fB\-\-directory\fR=\fIDIR\fR
  831. Change to \fIDIR\fR before performing any operations. This option is
  832. order-sensitive, i.e. it affects all options that follow.
  833. .TP
  834. \fB\-\-exclude\fR=\fIPATTERN\fR
  835. Exclude files matching \fIPATTERN\fR, a
  836. .BR glob (3)-style
  837. wildcard pattern.
  838. .TP
  839. \fB\-\-exclude\-backups\fR
  840. Exclude backup and lock files.
  841. .TP
  842. \fB\-\-exclude\-caches\fR
  843. Exclude contents of directories containing file \fBCACHEDIR.TAG\fR,
  844. except for the tag file itself.
  845. .TP
  846. \fB\-\-exclude\-caches\-all\fR
  847. Exclude directories containing file \fBCACHEDIR.TAG\fR and the file itself.
  848. .TP
  849. \fB\-\-exclude\-caches\-under\fR
  850. Exclude everything under directories containing \fBCACHEDIR.TAG\fR
  851. .TP
  852. \fB\-\-exclude\-ignore=\fIFILE\fR
  853. Before dumping a directory, see if it contains \fIFILE\fR.
  854. If so, read exclusion patterns from this file. The patterns affect
  855. only the directory itself.
  856. .TP
  857. \fB\-\-exclude\-ignore\-recursive=\fIFILE\fR
  858. Same as \fB\-\-exclude\-ignore\fR, except that patterns from
  859. \fIFILE\fR affect both the directory and all its subdirectories.
  860. .TP
  861. \fB\-\-exclude\-tag\fR=\fIFILE\fR
  862. Exclude contents of directories containing \fIFILE\fR, except for
  863. \fIFILE\fR itself.
  864. .TP
  865. \fB\-\-exclude\-tag\-all\fR=\fIFILE\fR
  866. Exclude directories containing \fIFILE\fR.
  867. .TP
  868. \fB\-\-exclude\-tag\-under\fR=\fIFILE\fR
  869. Exclude everything under directories containing \fIFILE\fR.
  870. .TP
  871. \fB\-\-exclude\-vcs\fR
  872. Exclude version control system directories.
  873. .TP
  874. \fB\-\-exclude\-vcs\-ignores\fR
  875. Exclude files that match patterns read from VCS-specific ignore
  876. files. Supported files are:
  877. .BR .cvsignore ,
  878. .BR .gitignore ,
  879. .BR .bzrignore ", and"
  880. .BR .hgignore .
  881. .TP
  882. \fB\-h\fR, \fB\-\-dereference\fR
  883. Follow symlinks; archive and dump the files they point to.
  884. .TP
  885. \fB\-\-hard\-dereference\fR
  886. Follow hard links; archive and dump the files they refer to.
  887. .TP
  888. \fB\-K\fR, \fB\-\-starting\-file\fR=\fIMEMBER\fR
  889. Begin at the given member in the archive.
  890. .TP
  891. \fB\-\-newer\-mtime\fR=\fIDATE\fR
  892. Work on files whose data changed after the \fIDATE\fR. If \fIDATE\fR
  893. starts with \fB/\fR or \fB.\fR it is taken to be a file name; the
  894. mtime of that file is used as the date.
  895. .TP
  896. \fB\-\-no\-null\fR
  897. Disable the effect of the previous \fB\-\-null\fR option.
  898. .TP
  899. \fB\-\-no\-recursion\fR
  900. Avoid descending automatically in directories.
  901. .TP
  902. \fB\-\-no\-unquote\fR
  903. Do not unquote input file or member names.
  904. .TP
  905. \fB\-\-no\-verbatim\-files\-from\fR
  906. Treat each line read from a file list as if it were supplied in the
  907. command line. I.e., leading and trailing whitespace is removed and,
  908. if the resulting string begins with a dash, it is treated as \fBtar\fR
  909. command line option.
  910. This is the default behavior. The \fB\-\-no\-verbatim\-files\-from\fR
  911. option is provided as a way to restore it after
  912. \fB\-\-verbatim\-files\-from\fR option.
  913. This option is positional: it affects all \fB\-\-files\-from\fR
  914. options that occur after it in, until \fB\-\-verbatim\-files\-from\fR
  915. option or end of line, whichever occurs first.
  916. It is implied by the \fB\-\-no\-null\fR option.
  917. .TP
  918. \fB\-\-null\fR
  919. Instruct subsequent \fB\-T\fR options to read null-terminated names
  920. verbatim (disables special handling of names that start with a dash).
  921. See also \fB\-\-verbatim\-files\-from\fR.
  922. .TP
  923. \fB\-N\fR, \fB\-\-newer\fR=\fIDATE\fR, \fB\-\-after\-date\fR=\fIDATE\fR
  924. Only store files newer than DATE. If \fIDATE\fR starts with \fB/\fR
  925. or \fB.\fR it is taken to be a file name; the ctime of that file is
  926. used as the date.
  927. .TP
  928. \fB\-\-one\-file\-system\fR
  929. Stay in local file system when creating archive.
  930. .TP
  931. \fB\-P\fR, \fB\-\-absolute\-names\fR
  932. Don't strip leading slashes from file names when creating archives.
  933. .TP
  934. \fB\-\-recursion\fR
  935. Recurse into directories (default).
  936. .TP
  937. \fB\-\-suffix\fR=\fISTRING\fR
  938. Backup before removal, override usual suffix. Default suffix is \fB~\fR,
  939. unless overridden by environment variable \fBSIMPLE_BACKUP_SUFFIX\fR.
  940. .TP
  941. \fB\-T\fR, \fB\-\-files\-from\fR=\fIFILE\fR
  942. Get names to extract or create from \fIFILE\fR.
  943. Unless specified otherwise, the \fIFILE\fR must contain a list of
  944. names separated by ASCII \fBLF\fR (i.e. one name per line). The
  945. names read are handled the same way as command line arguments. They
  946. undergo quote removal and word splitting, and any string that starts
  947. with a \fB\-\fR is handled as \fBtar\fR command line option.
  948. If this behavior is undesirable, it can be turned off using the
  949. \fB\-\-verbatim\-files\-from\fR option.
  950. The \fB\-\-null\fR option instructs \fBtar\fR that the names in
  951. \fIFILE\fR are separated by ASCII \fBNUL\fR character, instead of
  952. \fBLF\fR. It is useful if the list is generated by
  953. .BR find (1)
  954. .B \-print0
  955. predicate.
  956. .TP
  957. \fB\-\-unquote\fR
  958. Unquote file or member names (default).
  959. .TP
  960. \fB\-\-verbatim\-files\-from\fR
  961. Treat each line obtained from a file list as a file name, even if it
  962. starts with a dash. File lists are supplied with the
  963. \fB\-\-files\-from\fR (\fB\-T\fR) option. The default behavior is to
  964. handle names supplied in file lists as if they were typed in the
  965. command line, i.e. any names starting with a dash are treated as
  966. \fBtar\fR options. The \fB\-\-verbatim\-files\-from\fR option
  967. disables this behavior.
  968. This option affects all \fB\-\-files\-from\fR options that occur after
  969. it in the command line. Its effect is reverted by the
  970. \fB\-\-no\-verbatim\-files\-from} option.
  971. This option is implied by the \fB\-\-null\fR option.
  972. See also \fB\-\-add\-file\fR.
  973. .TP
  974. \fB\-X\fR, \fB\-\-exclude\-from\fR=\fIFILE\fR
  975. Exclude files matching patterns listed in FILE.
  976. .SS File name transformations
  977. .TP
  978. \fB\-\-strip\-components\fR=\fINUMBER\fR
  979. Strip \fINUMBER\fR leading components from file names on extraction.
  980. .TP
  981. \fB\-\-transform\fR=\fIEXPRESSION\fR, \fB\-\-xform\fR=\fIEXPRESSION\fR
  982. Use sed replace \fIEXPRESSION\fR to transform file names.
  983. .SS File name matching options
  984. These options affect both exclude and include patterns.
  985. .TP
  986. \fB\-\-anchored\fR
  987. Patterns match file name start.
  988. .TP
  989. \fB\-\-ignore\-case\fR
  990. Ignore case.
  991. .TP
  992. \fB\-\-no\-anchored\fR
  993. Patterns match after any \fB/\fR (default for exclusion).
  994. .TP
  995. \fB\-\-no\-ignore\-case\fR
  996. Case sensitive matching (default).
  997. .TP
  998. \fB\-\-no\-wildcards\fR
  999. Verbatim string matching.
  1000. .TP
  1001. \fB\-\-no\-wildcards\-match\-slash\fR
  1002. Wildcards do not match \fB/\fR.
  1003. .TP
  1004. \fB\-\-wildcards\fR
  1005. Use wildcards (default for exclusion).
  1006. .TP
  1007. \fB\-\-wildcards\-match\-slash\fR
  1008. Wildcards match \fB/\fR (default for exclusion).
  1009. .SS Informative output
  1010. .TP
  1011. \fB\-\-checkpoint\fR[=\fIN\fR]
  1012. Display progress messages every \fIN\fRth record (default 10).
  1013. .TP
  1014. \fB\-\-checkpoint\-action\fR=\fIACTION\fR
  1015. Run \fIACTION\fR on each checkpoint.
  1016. .TP
  1017. \fB\-\-clamp\-mtime\fR
  1018. Only set time when the file is more recent than what was given with \-\-mtime.
  1019. .TP
  1020. \fB\-\-full\-time\fR
  1021. Print file time to its full resolution.
  1022. .TP
  1023. \fB\-\-index\-file\fR=\fIFILE\fR
  1024. Send verbose output to \fIFILE\fR.
  1025. .TP
  1026. \fB\-l\fR, \fB\-\-check\-links\fR
  1027. Print a message if not all links are dumped.
  1028. .TP
  1029. \fB\-\-no\-quote\-chars\fR=\fISTRING\fR
  1030. Disable quoting for characters from \fISTRING\fR.
  1031. .TP
  1032. \fB\-\-quote\-chars\fR=\fISTRING\fR
  1033. Additionally quote characters from \fISTRING\fR.
  1034. .TP
  1035. \fB\-\-quoting\-style\fR=\fISTYLE\fR
  1036. Set quoting style for file and member names. Valid values for
  1037. \fISTYLE\fR are
  1038. .BR literal ,
  1039. .BR shell ,
  1040. .BR shell-always ,
  1041. .BR c ,
  1042. .BR c-maybe ,
  1043. .BR escape ,
  1044. .BR locale ,
  1045. .BR clocale .
  1046. .TP
  1047. \fB\-R\fR, \fB\-\-block\-number\fR
  1048. Show block number within archive with each message.
  1049. .TP
  1050. \fB\-\-show\-omitted\-dirs\fR
  1051. When listing or extracting, list each directory that does not match
  1052. search criteria.
  1053. .TP
  1054. \fB\-\-show\-transformed\-names\fR, \fB\-\-show\-stored\-names\fR
  1055. Show file or archive names after transformation by \fB\-\-strip\fR and
  1056. \fB\-\-transform\fR options.
  1057. .TP
  1058. \fB\-\-totals\fR[=\fISIGNAL\fR]
  1059. Print total bytes after processing the archive. If \fISIGNAL\fR is
  1060. given, print total bytes when this signal is delivered. Allowed
  1061. signals are:
  1062. .BR SIGHUP ,
  1063. .BR SIGQUIT ,
  1064. .BR SIGINT ,
  1065. .BR SIGUSR1 ", and"
  1066. .BR SIGUSR2 .
  1067. The \fBSIG\fR prefix can be omitted.
  1068. .TP
  1069. \fB\-\-utc\fR
  1070. Print file modification times in UTC.
  1071. .TP
  1072. \fB\-v\fR, \fB\-\-verbose\fR
  1073. Verbosely list files processed.
  1074. .TP
  1075. \fB\-\-warning\fR=\fIKEYWORD\fR
  1076. Enable or disable warning messages identified by \fIKEYWORD\fR. The
  1077. messages are suppressed if \fIKEYWORD\fR is prefixed with \fBno\-\fR
  1078. and enabled otherwise.
  1079. Multiple \fB\-\-warning\fR messages accumulate.
  1080. Keywords controlling general \fBtar\fR operation:
  1081. .RS
  1082. .TP
  1083. .B all
  1084. Enable all warning messages. This is the default.
  1085. .TP
  1086. .B none
  1087. Disable all warning messages.
  1088. .TP
  1089. .B filename-with-nuls
  1090. "%s: file name read contains nul character"
  1091. .TP
  1092. .B alone-zero-block
  1093. "A lone zero block at %s"
  1094. .HP
  1095. Keywords applicable for \fBtar --create\fR:
  1096. .TP
  1097. .B cachedir
  1098. "%s: contains a cache directory tag %s; %s"
  1099. .TP
  1100. .B file-shrank
  1101. "%s: File shrank by %s bytes; padding with zeros"
  1102. .TP
  1103. .B xdev
  1104. "%s: file is on a different filesystem; not dumped"
  1105. .TP
  1106. .B file-ignored
  1107. "%s: Unknown file type; file ignored"
  1108. .br
  1109. "%s: socket ignored"
  1110. .br
  1111. "%s: door ignored"
  1112. .TP
  1113. .B file-unchanged
  1114. "%s: file is unchanged; not dumped"
  1115. .TP
  1116. .B ignore-archive
  1117. "%s: file is the archive; not dumped"
  1118. .TP
  1119. .B file-removed
  1120. "%s: File removed before we read it"
  1121. .TP
  1122. .B file-changed
  1123. "%s: file changed as we read it"
  1124. .HP
  1125. Keywords applicable for \fBtar --extract\fR:
  1126. .TP
  1127. .B existing\-file
  1128. "%s: skipping existing file"
  1129. .TP
  1130. .B timestamp
  1131. "%s: implausibly old time stamp %s"
  1132. .br
  1133. "%s: time stamp %s is %s s in the future"
  1134. .TP
  1135. .B contiguous-cast
  1136. "Extracting contiguous files as regular files"
  1137. .TP
  1138. .B symlink-cast
  1139. "Attempting extraction of symbolic links as hard links"
  1140. .TP
  1141. .B unknown-cast
  1142. "%s: Unknown file type '%c', extracted as normal file"
  1143. .TP
  1144. .B ignore-newer
  1145. "Current %s is newer or same age"
  1146. .TP
  1147. .B unknown-keyword
  1148. "Ignoring unknown extended header keyword '%s'"
  1149. .TP
  1150. .B decompress-program
  1151. Controls verbose description of failures occurring when trying to run
  1152. alternative decompressor programs. This warning is disabled by
  1153. default (unless \fB\-\-verbose\fR is used). A common example of what
  1154. you can get when using this warning is:
  1155. .EX
  1156. $ \fBtar --warning=decompress-program -x -f archive.Z
  1157. tar (child): cannot run compress: No such file or directory
  1158. tar (child): trying gzip
  1159. .EE
  1160. This means that \fBtar\fR first tried to decompress
  1161. \fBarchive.Z\fR using \fBcompress\fR, and, when that
  1162. failed, switched to \fBgzip\fR.
  1163. .TP
  1164. .B record-size
  1165. "Record size = %lu blocks"
  1166. .HP
  1167. Keywords controlling incremental extraction:
  1168. .TP
  1169. .B rename-directory
  1170. "%s: Directory has been renamed from %s"
  1171. .br
  1172. "%s: Directory has been renamed"
  1173. .TP
  1174. .B new-directory
  1175. "%s: Directory is new"
  1176. .TP
  1177. .B xdev
  1178. "%s: directory is on a different device: not purging"
  1179. .TP
  1180. .B bad-dumpdir
  1181. "Malformed dumpdir: 'X' never used"
  1182. .RE
  1183. .TP
  1184. \fB\-w\fR, \fB\-\-interactive\fR, \fB\-\-confirmation\fR
  1185. Ask for confirmation for every action.
  1186. .SS Compatibility options
  1187. .TP
  1188. \fB\-o\fR
  1189. When creating, same as \fB\-\-old\-archive\fR. When extracting, same
  1190. as \fB\-\-no\-same\-owner\fR.
  1191. .SS Size suffixes
  1192. .sp
  1193. .nf
  1194. .ta 8n 18n 42n
  1195. .ul
  1196. Suffix Units Byte Equivalent
  1197. b Blocks \fISIZE\fR x 512
  1198. B Kilobytes \fISIZE\fR x 1024
  1199. c Bytes \fISIZE\fR
  1200. G Gigabytes \fISIZE\fR x 1024^3
  1201. K Kilobytes \fISIZE\fR x 1024
  1202. k Kilobytes \fISIZE\fR x 1024
  1203. M Megabytes \fISIZE\fR x 1024^2
  1204. P Petabytes \fISIZE\fR x 1024^5
  1205. T Terabytes \fISIZE\fR x 1024^4
  1206. w Words \fISIZE\fR x 2
  1207. .fi
  1208. .PP
  1209. .SH "RETURN VALUE"
  1210. Tar exit code indicates whether it was able to successfully perform
  1211. the requested operation, and if not, what kind of error occurred.
  1212. .TP
  1213. .B 0
  1214. Successful termination.
  1215. .TP
  1216. .B 1
  1217. .I Some files differ.
  1218. If tar was invoked with the \fB\-\-compare\fR (\fB\-\-diff\fR, \fB\-d\fR)
  1219. command line option, this means that some files in the archive differ
  1220. from their disk counterparts. If tar was given one of the \fB\-\-create\fR,
  1221. \fB\-\-append\fR or \fB\-\-update\fR options, this exit code means
  1222. that some files were changed while being archived and so the resulting
  1223. archive does not contain the exact copy of the file set.
  1224. .TP
  1225. .B 2
  1226. .I Fatal error.
  1227. This means that some fatal, unrecoverable error occurred.
  1228. .PP
  1229. If a subprocess that had been invoked by
  1230. .B tar
  1231. exited with a nonzero exit code,
  1232. .B tar
  1233. itself exits with that code as well. This can happen, for example, if
  1234. a compression option (e.g. \fB\-z\fR) was used and the external
  1235. compressor program failed. Another example is
  1236. .B rmt
  1237. failure during backup to a remote device.
  1238. .SH "SEE ALSO"
  1239. .BR bzip2 (1),
  1240. .BR compress (1),
  1241. .BR gzip (1),
  1242. .BR lzma (1),
  1243. .BR lzop (1),
  1244. .BR rmt (8),
  1245. .BR symlink (7),
  1246. .BR tar (5),
  1247. .BR xz (1).
  1248. .PP
  1249. Complete \fBtar\fR manual: run
  1250. .B info tar
  1251. or use
  1252. .BR emacs (1)
  1253. info mode to read it.
  1254. .PP
  1255. Online copies of \fBGNU tar\fR documentation in various formats can be
  1256. found at:
  1257. .PP
  1258. .in +4
  1259. .B http://www.gnu.org/software/tar/manual
  1260. .SH "BUG REPORTS"
  1261. Report bugs to <bug\-tar@gnu.org>.
  1262. .SH COPYRIGHT
  1263. Copyright \(co 2013 Free Software Foundation, Inc.
  1264. .br
  1265. .na
  1266. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  1267. .br
  1268. .ad
  1269. This is free software: you are free to change and redistribute it.
  1270. There is NO WARRANTY, to the extent permitted by law.
  1271. .\" Local variables:
  1272. .\" eval: (add-hook 'write-file-hooks 'time-stamp)
  1273. .\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.\\-]* [0-9] \""
  1274. .\" time-stamp-format: "%:B %:d, %:y"
  1275. .\" time-stamp-end: "\""
  1276. .\" time-stamp-line-limit: 20
  1277. .\" end: