4
0

tar.1 41 KB

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