tar.1 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. .\" $Id: tar.1,v 1.2 89/02/12 10:08:55 mark Exp $
  2. .TH TAR 1 "USENIX Association" ""
  3. .SH NAME
  4. tar \- process tape archives
  5. .SH SYNOPSIS
  6. .B tar
  7. .BR \-c [ bfvw ]
  8. .I device
  9. .I block
  10. .I filename...
  11. .br
  12. .B tar
  13. .BR \-r [ bvw ]
  14. .I device
  15. .I block
  16. .RI [ filename... ]
  17. .br
  18. .B tar
  19. .BR \-t [ fv ]
  20. .I device
  21. .br
  22. .B tar
  23. .BR \-u [ bvw ]
  24. .I device
  25. .I block
  26. .br
  27. .B tar
  28. .BR \-x [ flmovw ]
  29. .I device
  30. .RI [ filename... ]
  31. .SH DESCRIPTION
  32. .I Tar
  33. reads and writes archive files which conform to the
  34. .B "Archive/Interchange File Format"
  35. specified in
  36. .IR "IEEE Std. 1003.1-1988" .
  37. .SS Options
  38. The following options are available:
  39. .TP 1i
  40. .B \-c
  41. Creates a new archive; writing begins at the beginning of the archive,
  42. instead of after the last file.
  43. .TP 1i
  44. .B \-r
  45. Writes names files to the end of the archive.
  46. .TP 1i
  47. .B \-t
  48. Lists the names of all of the files in the archive.
  49. .TP 1i
  50. .B \-u
  51. Causes named files to be
  52. added to the archive if they are not already there, or have been
  53. modified since last written into the archive.
  54. This implies the
  55. .B \-r
  56. option.
  57. .TP 1i
  58. .B \-x
  59. Extracts named files
  60. from the archive.
  61. If a named file matches a directory whose contents had been written onto
  62. the archive, that directory is recursively extracted.
  63. If a named file in the archive does not exist on the system, the file is
  64. create with the same mode as the one in the archive, except that the
  65. set-user-id and get-group-id modes are not set unless the user has
  66. appropriate privileges.
  67. .PP
  68. If the files exist, their modes are not changed except as described above.
  69. The owner, group and modification time are restored if possible.
  70. If no
  71. .I filename
  72. argument is given, the entire contents of the archive is extracted.
  73. Note that if several files with the same name are in the archive,
  74. the last one will overwrite all earlier ones.
  75. .TP 1i
  76. .B \-b
  77. Causes
  78. .I tar
  79. to use the next argument on the command line as the blocking factor for
  80. tape records.
  81. The default is 1; the maximum is 20.
  82. This option should only be used with raw magnetic tape archives.
  83. Normally, the block size is determined automatically when reading tapes.
  84. .TP 1i
  85. .B \-f
  86. Causes
  87. .I tar
  88. to use the next argument on the command line as the name of the archive
  89. instead of the default, which is usually a tape drive.
  90. If
  91. .B -
  92. is specified as a filename
  93. .I tar
  94. writes to the standard output or reads from the standard input, whichever
  95. is appropriate for the options given.
  96. Thus,
  97. .I tar
  98. can be used as the head or tail of a pipeline.
  99. .TP 1i
  100. .B \-l
  101. Tells
  102. .I tar
  103. to report if it cannot resolve all of the links to the files being
  104. archived.
  105. If
  106. .B \-l
  107. is not specified, no error messages are written to the standard output.
  108. This modifier is only valid with the
  109. .BR \-c ,
  110. .B \-r
  111. and
  112. .BR \-u
  113. options.
  114. .TP 1i
  115. .B \-m
  116. Tells
  117. .I tar
  118. not to restore the modification times.
  119. The modification time of the file will be the time of extraction.
  120. This modifier is invalid with th
  121. .B \-t
  122. option.
  123. .TP 1i
  124. .B \-o
  125. Causes extracted files to take on the user and group identifier of the user
  126. running the program rather than those on the archive.
  127. This modifier is only valid with the
  128. .B \-x
  129. option.
  130. .TP 1i
  131. .B \-v
  132. Causes
  133. .I tar
  134. to operate verbosely. Usually,
  135. .I tar
  136. does its work silently, but
  137. the
  138. .B v
  139. modifier causes it to print the name of each file it processes,
  140. preceded by the option letter.
  141. With the
  142. .B \-t
  143. option,
  144. .B v
  145. gives more information about the archive entries than just the name.
  146. .TP 1i
  147. .B \-w
  148. Causes
  149. .I tar
  150. to print the action to be taken, followed by the name of the file, and then
  151. wait for the user's confirmation.
  152. If a word beginning with
  153. .B y
  154. is given, the action is performed.
  155. Any other input means "no".
  156. This modifier is invalid with the
  157. .B \-t
  158. option.
  159. .SH FILES
  160. .TP 1i
  161. /dev/tty
  162. used to prompt the user for information when the
  163. .BR \-i " or " \-y
  164. options are specified.
  165. .SH "SEE ALSO"
  166. cpio(1), dd(1), find(1), pax(1), cpio(5), tar(5)
  167. .SH COPYRIGHT
  168. Copyright (c) 1989 Mark H. Colburn.
  169. .br
  170. All rights reserved.
  171. .PP
  172. Redistribution and use in source and binary forms are permitted
  173. provided that the above copyright notice is duplicated in all such
  174. forms and that any documentation, advertising materials, and other
  175. materials related to such distribution and use acknowledge that the
  176. software was developed by Mark H. Colburn and sponsored by The
  177. USENIX Association.
  178. .PP
  179. THE SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  180. IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  181. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  182. .SH AUTHOR
  183. Mark H. Colburn
  184. .br
  185. NAPS International
  186. .br
  187. 117 Mackubin Street, Suite 1
  188. .br
  189. St. Paul, MN 55102
  190. .br
  191. mark@jhereg.MN.ORG
  192. .sp 2
  193. Sponsored by
  194. .B "The USENIX Association"
  195. for public distribution.