home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / info / tar.info-2 < prev    next >
Encoding:
GNU Info File  |  1996-10-12  |  47.1 KB  |  1,208 lines

  1. This is Info file tar.info, produced by Makeinfo-1.64 from the input
  2. file /ade-src/fsf/tar/doc/tar.texinfo.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * tar: (tar).            Making tape (or disk) archives.
  6. END-INFO-DIR-ENTRY
  7.  
  8.    This file documents GNU `tar', a utility used to store, backup, and
  9. transport files.
  10.  
  11.    Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
  12.  
  13.    Permission is granted to make and distribute verbatim copies of this
  14. manual provided the copyright notice and this permission notice are
  15. preserved on all copies.
  16.  
  17.    Permission is granted to copy and distribute modified versions of
  18. this manual under the conditions for verbatim copying, provided that
  19. the entire resulting derived work is distributed under the terms of a
  20. permission notice identical to this one.
  21.  
  22.    Permission is granted to copy and distribute translations of this
  23. manual into another language, under the above conditions for modified
  24. versions, except that this permission notice may be stated in a
  25. translation approved by the Foundation.
  26.  
  27. 
  28. File: tar.info,  Node: Listing files in an archive bis,  Next: Getting Additional File Information bis,  Prev: How to List Archives,  Up: How to List Archives
  29.  
  30. Listing the Contents of an Archive
  31. ----------------------------------
  32.  
  33.      *(This message will disappear, once this node revised.)*
  34.  
  35.    You can list the contents of the archive you just created with
  36. another option of `tar': `--list' (`-t').  To list the contents of an
  37. archive, type:
  38.  
  39.      % tar --list --file=records
  40.  
  41.    `tar' will respond:
  42.  
  43.      blues folk jazz
  44.  
  45. FIXME: xref Listing Archive Contents
  46.    , for a more detailed tutorial of the `--list' (`-t') operation.
  47. FIXME: xref Listing Contents
  48.    for more information about the `--list' (`-t') operation.
  49. FIXME:
  50.  
  51.    You can use `--list' (`-t') to output a list of the files in an
  52. archive.  If you use file name arguments with this operation, `tar'
  53. will look in the archive for the files specified and display their
  54. names only if they are, in fact, stored.  You can use `--list' (`-t')
  55. with the `--verbose' (`-v') option to find out the attributes (owner,
  56. size, etc.) of stored files.
  57.  
  58.    You can list the contents of an archive with another operation of
  59. `tar': `--list' (`-t').  To list the contents of the archive you just
  60. created, type:
  61.  
  62.      % tar --list --file=records
  63.  
  64.    `tar' will respond:
  65.  
  66.      blues folk jazz
  67.  
  68. FIXME: xref Listing Archive Contents
  69.    , for a more detailed tutorial of the `--list' (`-t') operation.
  70. FIXME: xref Listing Contents
  71.    , for more information about the `--list' (`-t') operation.
  72.  
  73.    In a previous example, you created the archive `music' in the home
  74. directory.  To list the contents of `music':
  75.  
  76.    * List the contents of an archive by using `--list' (`-t') with
  77.      `tar'.
  78.  
  79.    * Specify the name of the archive to be
  80.      listed--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').
  81.  
  82.    Thus:
  83.  
  84.      % tar --list --file=music
  85.      practice/
  86.      practice/blues
  87.      practice/folk
  88.      practice/jazz
  89.      practice/records
  90.  
  91.    Use `--list' (`-t') to print the names of files stored in an
  92. archive.  If you use file name arguments with this operation, `tar'
  93. prints the names of the specified files if they are stored in the
  94. archive.  If you use a directory name as a file name argument, `tar'
  95. also prints the names of all underlying files, including
  96. sub-directories.  If you use no file name arguments, `tar' prints the
  97. names of all the archive members.
  98.  
  99.    You can use `--list' (`-t') with the `--verbose' (`-v') option to
  100. print archive members' attributes (owner, size, etc.).
  101.  
  102.    To list the names of files stored in an archive, use the `--list'
  103. (`-t') operation of `tar'.
  104.  
  105.    In a previous example, you created the archive `~/music'.  To list
  106. the contents of `music', while in your home directory:
  107.  
  108.    * List the contents of an archive by using {No Value For "-list"}
  109.      with `tar'.
  110.  
  111.    * Specify the archive to be listed--`--file=ARCHIVE-NAME' (`-f
  112.      ARCHIVE-NAME').
  113.  
  114.    Thus:
  115.  
  116.      % tar --list --file=music
  117.      practice/
  118.      practice/blues
  119.      practice/folk
  120.      practice/jazz
  121.      practice/records
  122.  
  123. 
  124. File: tar.info,  Node: Getting Additional File Information bis,  Next: List A Specific File in an Archive bis,  Prev: Listing files in an archive bis,  Up: How to List Archives
  125.  
  126. Getting Additional File Information
  127. -----------------------------------
  128.  
  129.      *(This message will disappear, once this node revised.)*
  130.  
  131.    When you specify the `--verbose' (`-v') option in conjunction with
  132. `--list' (`-t'), `tar' will print additional information about the
  133. files being listed (file protection, owner and group ID, size, and date
  134. and time of creation).  The example above, in verbose mode, would be:
  135.  
  136.      % tar --list --verbose --file=music
  137.      drwxrwxrwx myself/user 0 May 31 21:49 1990 practice/
  138.      -rw-rw-rw- myself/user 42 May 21 13:29 1990 practice/blues
  139.      -rw-rw-rw- myself/user 62 May 23 10:55 1990 practice/folk
  140.      -rw-rw-rw- myself/user 40 May 21 13:30 1990 practice/jazz
  141.      -rw-rw-rw- myself/user 10240 May 31 21:49 1990 practice/records
  142.      %
  143.  
  144.    Note that using `--verbose' (`-v') with `--list' (`-t') does not
  145. cause `tar' to print the names of files as they are being acted on,
  146. though the `--verbose' (`-v') option will have this effect with all
  147. other operations.
  148.  
  149.    To get more information when you list the names of files stored in an
  150. archive, specify the `--verbose' (`-v') option in conjunction with
  151. `--list' (`-t').
  152.  
  153.    `tar' will print archive member's file protection, owner and group
  154. ID, size, and date and time of creation.
  155.  
  156.    For example:
  157.  
  158.      % tar --list --verbose --file=music
  159.      drwxrwxrwx myself/user 0 May 31 21:49 1990 practice/
  160.      -rw-rw-rw- myself/user 42 May 21 13:29 1990 practice/blues
  161.      -rw-rw-rw- myself/user 62 May 23 10:55 1990 practice/folk
  162.      -rw-rw-rw- myself/user 40 May 21 13:30 1990 practice/jazz
  163.      -rw-rw-rw- myself/user 10240 May 31 21:49 1990 practice/records
  164.      %
  165.  
  166.    Note that when you use `--verbose' (`-v') with `--list' (`-t'),
  167. `tar' doesn't print the names of files as they are being acted on,
  168. though the `--verbose' (`-v') option will have this effect when used
  169. with all other operations.
  170.  
  171. 
  172. File: tar.info,  Node: List A Specific File in an Archive bis,  Next: Listing the Contents of a Stored Directory ter,  Prev: Getting Additional File Information bis,  Up: How to List Archives
  173.  
  174. List A Specific File in an Archive
  175. ----------------------------------
  176.  
  177.      *(This message will disappear, once this node revised.)*
  178.  
  179. FIXME:
  180.    To to see if a particular file is in an archive, specify the name of
  181. the file in question as a file name argument while specifying the
  182. `--list' (`-t') operation.  For example, if you wanted to see if the
  183. file `folk' were in the archive file `music', you would:
  184.  
  185.    * Invoke `tar', and specify the operation to list the contents of an
  186.      archive--`--list' (`-t').
  187.  
  188.    * Specify the name of the archive file to be acted
  189.      on--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').
  190.  
  191.    * Specify the name of the file `tar' is to look for, as a file name
  192.      argument.  Because `tar' preserves paths, file names must be
  193.      specified as they appear in the archive (ie.. as they are relative
  194.      to the directory from which the archive was created).
  195.      FIXME: xref -P
  196.  
  197.    Type:
  198.  
  199.      % tar --list --file=music practice/folk
  200.  
  201. `tar' responds:
  202.  
  203.      practice/folk
  204.  
  205. If the file were not in the archive (for example, the file
  206. `practice/rock'), the example above would look like:
  207.  
  208.      % tar --list --file=music practice/rock
  209.      tar: practice/rock not found in archive
  210.  
  211.    The `--verbose' (`-v') option does not have any effect on execution
  212. of the `--list' (`-t') operation when you have specified file name
  213. arguments.
  214. FIXME: this is a bug (?)
  215.  
  216.    To to see if a particular file is in an archive, use the name of the
  217. file in question as a file name argument while specifying the `--list'
  218. (`-t') operation.  For example, to see whether the file `folk' is in the
  219. archive file `music', do the following:
  220.  
  221.    * Invoke `tar', and specify the `--list' (`-t') operation.
  222.  
  223.    * Specify the archive file to be acted on--`--file=ARCHIVE-NAME'
  224.      (`-f ARCHIVE-NAME').
  225.  
  226.    * Specify the files to look for, by typing their names as file name
  227.      arguments.  You have to type the file name as it appears in the
  228.      archive (normally, as it is relative to the relative to the
  229.      directory from which the archive was created).
  230.      FIXME: xref absolute-names
  231.  
  232.    Type:
  233.  
  234.      % tar --list --file=music practice/folk
  235.  
  236.    `tar' responds:
  237.  
  238.      practice/folk
  239.  
  240.    If the file were not stored in the archive (for example, the file
  241. `practice/rock'), the example above would look like:
  242.  
  243.      % tar --list --file=music practice/rock
  244.      tar: practice/rock not found in archive
  245.  
  246.    If you had used `--verbose' (`-v') mode, the example above would
  247. look like:
  248.  
  249.      % tar --list --file=music practice/folk
  250.      -rw-rw-rw- myself/user 62 May 23 10:55 1990 practice/folk
  251.  
  252. 
  253. File: tar.info,  Node: Listing the Contents of a Stored Directory ter,  Prev: List A Specific File in an Archive bis,  Up: How to List Archives
  254.  
  255. Listing the Contents of a Stored Directory
  256. ------------------------------------------
  257.  
  258.      *(This message will disappear, once this node revised.)*
  259.  
  260.    To get information about the contents of an archived directory, use
  261. the directory name as a file name argument in conjunction with `--list'
  262. (`-t').  To find out file attributes, include the `--verbose' (`-v')
  263. option.
  264.  
  265.    For example, to find out about files in the directory `practice', in
  266. the archive file `music', type:
  267.  
  268.      % tar --list --file=music practice
  269.  
  270.    `tar' responds:
  271.  
  272.      drwxrwxrwx myself/user 0 May 31 21:49 1990 practice/
  273.      -rw-rw-rw- myself/user 42 May 21 13:29 1990 practice/blues
  274.      -rw-rw-rw- myself/user 62 May 23 10:55 1990 practice/folk
  275.      -rw-rw-rw- myself/user 40 May 21 13:30 1990 practice/jazz
  276.      -rw-rw-rw- myself/user 10240 May 31 21:49 1990 practice/records
  277.  
  278.    When you use a directory name as a file name argument, `tar' acts on
  279. all the files (including sub-directories) in that directory.
  280.  
  281. 
  282. File: tar.info,  Node: How to Extract Members from an Archive,  Next: How to Add Files to Existing Archives,  Prev: How to List Archives,  Up: Tutorial
  283.  
  284. How to Extract Members from an Archive
  285. ======================================
  286.  
  287.      *(This message will disappear, once this node revised.)*
  288.  
  289.    In order to extract members from an archive, use the `--extract'
  290. (`-x') option.  Specify the name of the archive with
  291. `--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').  To extract specific archive
  292. members, give their member names as arguments.  It essential to give
  293. their exact member name, as printed by `--list' (`-t').  This will
  294. create a copy of the archive member, with a file name the same as its
  295. name in the archive.
  296.  
  297.    Keeping the example of the two archives created at the beginning of
  298. this tutorial, `tar --extract --file=afiles.tar apple' would create a
  299. file `apple' in the current directory with the contents of the archive
  300. member `apple'.  It would remove any file named `apple' already present
  301. in the directory, but it would not change the archive in any way.
  302.  
  303.    Remember that specifying the exact member name is important.  `tar
  304. --extract --file=bfiles.tar baloons' will fail, because there is no
  305. member named `baloons'.  To extract the member named `./baloons' you
  306. would need to specify `tar --extract --file=bfiles.tar ./baloons'.  To
  307. find the exact member names of the members of an archive, use `--list'
  308. (`-t').
  309. FIXME: xref Listing Archives.
  310.  
  311.    If you do not list any archive member names, then `--extract' (`-x')
  312. will extract all the members of the archive.
  313.  
  314.    If you give the `--verbose' (`-v') option, then `--extract' (`-x')
  315. will print the names of the archive members as it extracts them.
  316.  
  317. * Menu:
  318.  
  319. * Extracting Files bis::
  320. * Extracting Files from an Archive ter::
  321. * Extracting Specific Files ter::
  322. * Extracting Directories ter::
  323.  
  324. 
  325. File: tar.info,  Node: Extracting Files bis,  Next: Extracting Files from an Archive ter,  Prev: How to Extract Members from an Archive,  Up: How to Extract Members from an Archive
  326.  
  327. Extract Files from an Archive into Your Current Directory
  328. ---------------------------------------------------------
  329.  
  330.      *(This message will disappear, once this node revised.)*
  331.  
  332.    Obviously, the ultimate goal of `tar' users is to eventually get
  333. their files back.  To do this, use the `--extract' (`-x') or `--get'
  334. operation.  `--extract' (`-x') can be used to retrieve individual files
  335. from an archive, or can be used to write all the files in the archive
  336. back into the file system.
  337.  
  338.    In the previous example you concatenated two archives, `music', and
  339. `practice/records'.  To now retrieve the complete contents of `music'
  340. (the target file in the concatenation process), you would, from the
  341. home directory:
  342.  
  343.    * Invoke `tar' and specify the operation to extract files from an
  344.      archive (`--extract' (`-x') or `--get'.
  345.  
  346.    * Specify the name of the archive the files will be extracted
  347.      from--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').
  348.  
  349.    * Specify the names of the files you wish to extract, as file name
  350.      arguments (in this case you want to extract the entire archive, so
  351.      you don't need to specify anything).
  352.  
  353.      % tar --extract --file=music
  354.      tar: Could not make directory practice : File exists
  355.  
  356. Because the files stored originally in `music' were stored as files in
  357. a subdirectory (not as files in the working directory), they are stored
  358. in the archive with a leading directory name--`tar', in restoring them,
  359. has tried to recreate that directory and failed: the directory already
  360. exists.  The extraction has not been aborted, however.  If you now
  361. change into the `practice' directory and generate a directory listing,
  362. you will find that `jazz', which we removed in an earlier example, has
  363. been resurrected.
  364.  
  365.      % cd practice
  366.      % ls
  367.      blues       classical  folk     jazz        records    rock
  368.  
  369.    If you look more closely at the files in the directory, however, you
  370. will find that `blues' and `folk' are, in fact, the original versions
  371. of the file, which were stored in `music' at the beginning of the
  372. tutorial.  `tar', in extracting the original files from `music', has
  373. overwritten the existing files in the file system.
  374.  
  375.    While the newer versions of the files were stored in `records'
  376. above, they can no longer be extracted from it.  `records' too was
  377. archived by `tar' when the `practice' directory was stored in the
  378. archive file `music', and was restored to its older incarnation when
  379. the files in `practice' were overwritten.  However, the newer version
  380. of `records' was concatenated with `music'.  The contents of the newer
  381. version of `records', therefore, should have been extracted when all
  382. the contents of `music' were extracted.  They were.  `tar' has restored
  383. them into the working directory using the names with which they were
  384. originally stored.  Because they were originally stored as part of
  385. `records', in the `practice' directory, they had no preceeding
  386. directory stored as part of their file names.  To find the latest
  387. versions of `blues', `folk', `jazz', `rock' and `classical', look in
  388. your home directory.
  389.  
  390.    You may wish to restore the files in your `practice' directory to
  391. their last state before we extracted the files from `music'.  Rather
  392. than moving the files from your home directory to the `practice'
  393. subdirectory, you can run the same extraction procedure as above using
  394. the `practice' subdirectory as your working directory:
  395.  
  396.      % cd practice
  397.      % tar --extract --verbose --file=~/music
  398.      practice/
  399.      practice/blues
  400.      practice/folk
  401.      practice/jazz
  402.      practice/records
  403.      blues
  404.      folk
  405.      jazz
  406.      blues
  407.      rock
  408.      blues
  409.      classical
  410.      %
  411.  
  412. If you now examine the files in the practice directory, you will find
  413. that the files have been restored to their previous, newer, states.
  414. The old versions of the files, which were stored in `music' with a
  415. preceeding directory name, have been written into a newly created
  416. subdirectory under the working directory (which is your `practice'
  417. subdirectory).  The new subdirectory is also called `practice'.
  418.  
  419. 
  420. File: tar.info,  Node: Extracting Files from an Archive ter,  Next: Extracting Specific Files ter,  Prev: Extracting Files bis,  Up: How to Extract Members from an Archive
  421.  
  422. Extracting Files from an Archive
  423. --------------------------------
  424.  
  425.      *(This message will disappear, once this node revised.)*
  426.  
  427.    Creating an archive is only half the job--there would be no point in
  428. storing files in an archive if you couldn't retrieve them.  To extract
  429. files from an archive, use the `--extract' (`-x') operation.
  430.  
  431.    To extract specific files, use their names as file name arguments.
  432. If you use a directory name as a file name argument, `tar' extracts all
  433. the files (including subdirectories) in that directory.  If you don't
  434. use any file name arguments, `tar' extracts all the files in the
  435. archive.
  436.  
  437.    Note: `tar' will extract an archive member into the file system
  438. without checking to see if there is already a file with the archive
  439. member's file name.  If there is a file with that name, `tar' will
  440. *overwrite* that file and its contents will be lost.
  441. FIXME: xref keep-old
  442.  
  443. 
  444. File: tar.info,  Node: Extracting Specific Files ter,  Next: Extracting Directories ter,  Prev: Extracting Files from an Archive ter,  Up: How to Extract Members from an Archive
  445.  
  446. Extracting Specific Files
  447. -------------------------
  448.  
  449.      *(This message will disappear, once this node revised.)*
  450.  
  451.    To extract specific files, specify them using file name arguments.
  452.  
  453.    In an example above, you created the archive file
  454. `~/practice/records', which contained the files `blues', `folk' and
  455. `jazz' in the `practice' directory.  If, for some reason, you were to
  456. lose one of those text files (`rm ~/practice/blues'), you could extract
  457. it from the archive file.
  458.  
  459.    First, change into the `practice' directory.  Then,
  460.  
  461.    * Invoke `tar' and specify the `--extract' (`-x') or `--get'
  462.      operation.
  463.  
  464.    * Specify the archive that the files will be extracted
  465.      from--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').
  466.  
  467.    * Specify the files to extract, using file name arguments (if you
  468.      don't specify any files, `tar' extracts all the archive members)
  469.  
  470.      % tar --extract --file=records blues
  471.  
  472.    If you list the contents of the directory, you will see that `blues'
  473. is back:
  474.  
  475.      % ls
  476.      folk
  477.      jazz
  478.      records
  479.      blues
  480.  
  481. 
  482. File: tar.info,  Node: Extracting Directories ter,  Prev: Extracting Specific Files ter,  Up: How to Extract Members from an Archive
  483.  
  484. Extracting Directories
  485. ----------------------
  486.  
  487.      *(This message will disappear, once this node revised.)*
  488.  
  489.    To extract a directory and all the files it contains, use the
  490. directory's name as a file name argument in conjunction with `tar
  491. +extract'.  Remember-`tar' stores and extracts file names relative to
  492. the working directory.
  493.  
  494.    In a previous example you stored the directory `~/practice' in the
  495. archive file `~/music'.  If you delete the contents of `practice', you
  496. can restore them using `tar'.
  497.  
  498.    First, change into the `practice' subdirectory (`cd ~/practice').
  499. Then, remove all the files in `~/practice' (`rm *').  If you list the
  500. contents of the directory, you should now see that it is empty:
  501.  
  502.      %ls
  503.      %
  504.  
  505.    Let's try to restore the contents of `practice' by extracting them
  506. from the archive file `~/music':
  507.  
  508.      tar --extract --file=~/music practice
  509.  
  510.    Now, list the contents of `practice' again:
  511.  
  512.      %ls
  513.      practice
  514.  
  515.    What happened to the files?  When you created `~/music', your
  516. working directory was your home directory.  When you extracted
  517. `~/music', your working directory was `~/practice'. `tar' stored the
  518. files in `practice' relative to your home directory, and then extracted
  519. them relative to `~/practice'.  The files are now in a new
  520. subdirectory, called `~/practice/practice'.
  521.  
  522.    To restore your files to their old positions, delete the new
  523. directory and its contents, and then redo the example above with your
  524. home directory as the working directory:
  525.  
  526.      % rm ~/practice/practice/*
  527.      % rmdir practice
  528.      % cd ..
  529.      % tar --extract --file=music practice
  530.  
  531.    (`tar' will report that it is unable to create the directory
  532. `~/practice' because it already exists.  This will not effect the
  533. extraction of the other archive members.)
  534.  
  535. 
  536. File: tar.info,  Node: How to Add Files to Existing Archives,  Next: How to Delete Members from Archives,  Prev: How to Extract Members from an Archive,  Up: Tutorial
  537.  
  538. How to Add Files to Existing Archives
  539. =====================================
  540.  
  541.      *(This message will disappear, once this node revised.)*
  542.  
  543.    If you want to add files to an existing archive, then don't use
  544. `--create' (`-c').  That will erase the archive and create a new one in
  545. its place.  Instead, use `--append' (`-r').  The command `tar --append
  546. --file=afiles.tar arbalest' would add the file `arbalest' to the
  547. existing archive `afiles.tar'.  The archive must already exist in order
  548. to use `--append' (`-r').
  549.  
  550.    As with `--create' (`-c'), the member names of the newly added files
  551. will be the exact same as their names given on the command line.  The
  552. `--verbose' (`-v') option will print out the names of the files as they
  553. are written into the archive.
  554.  
  555.    If you add a file to an archive using `--append' (`-r') with the
  556. same name as an archive member already present in the archive, then the
  557. old member is not deleted.  What does happen, however, is somewhat
  558. complex.
  559. FIXME: xref Multiple Members with the Same Name.
  560.    If you want to replace an archive member, use `--delete' first, and
  561. then use `--append' (`-r').
  562.  
  563. FIXME: we want people to use the script for backups, so I an not going
  564. FIXME: to use backups as an explanation in the tutorial.  (people can still
  565. FIXME: do it if they really want to)
  566.  
  567.    While you can use `tar' to create a new archive every time you want
  568. to store a file, it is more sometimes efficient to add files to an
  569. existing archive.
  570.  
  571.    To add new files to an existing archive, use the `--append' (`-r')
  572. operation.  To add newer versions of archive members to an archive, use
  573. the `--update' (`-u') operation.
  574.  
  575.    While you can use `tar' to create an archive of an entire directory
  576. or directory tree, it is more efficient when performing backups to only
  577. archive those files which have been newly created or changed since the
  578. last backup.
  579.  
  580.    To add new files to an existing archive, or to add newer versions of
  581. old files, you can use the `--append' (`-r') operation, or the
  582. `--update' (`-u') operation.
  583.  
  584. * Menu:
  585.  
  586. * Append bis::
  587. * Update bis::
  588. * Concatenate bis::
  589.  
  590. 
  591. File: tar.info,  Node: Append bis,  Next: Update bis,  Prev: How to Add Files to Existing Archives,  Up: How to Add Files to Existing Archives
  592.  
  593. Appending Files to an Archive
  594. -----------------------------
  595.  
  596.      *(This message will disappear, once this node revised.)*
  597.  
  598.    The simplest method of adding a file to an already existing archive
  599. is the `--append' (`-r') operation, which writes the files specified
  600. into the archive without regard to whether or not they are already
  601. among the archived files.  When you use `--append' (`-r') you must
  602. specify file name arguments, there is no default.  If you specify a
  603. file that already exists in the archive another copy of the file will
  604. be added to the end of the archive anyway.
  605.  
  606.    In the previous examples you created a file called `rock' in the
  607. practice directory which did not exist in either the archive file
  608. `records', in the practice directory, or the archive file `music', in
  609. the home directory.  To add `rock' to `records', you would, while in
  610. the practice directory:
  611.  
  612.    * Invoke `tar' and specify the operation to add a file--`--append'
  613.      (`-r').
  614.  
  615.    * Specify the name of the archive to which the file will be
  616.      added--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').
  617.  
  618.    * Specify the name(s) of the file(s) to be added to the archive as
  619.      the file name argument(s)
  620.  
  621.      % tar --append --file=records rock
  622.  
  623. If you now use the `--list' (`-t') operation, you will see that `rock'
  624. has been added to the archive:
  625.  
  626.      % tar --list --file=records
  627.      blues
  628.      folk
  629.      jazz
  630.      rock
  631.  
  632.    While all newly created files have now been added to `records', it
  633. is still not current with respect to the contents of the practice
  634. directory.  If you recall from the examples using `--compare' (`-d')
  635. above, `blues' was changed after the archive `records' was created.  It
  636. is simple, however, to use `--append' (`-r') to correct the problem:
  637.  
  638.      % tar --append --verbose --file=records blues
  639.      blues
  640.  
  641. Because you specified the `--verbose' (`-v') option, `tar' has printed
  642. the name of the file being appended as it was acted on.  If you now use
  643. `tar' with the `--list' (`-t') option specified to get the contents of
  644. the archive, you will optain the following:
  645.  
  646.      % tar --list -f records
  647.      blues
  648.      folk
  649.      jazz
  650.      rock
  651.      blues
  652.  
  653. The newest version of `blues' is now at the end of the archive.
  654. Because files are extracted from archives in the order in which they
  655. appear in the archive, and because extracted files are given the same
  656. names in the file system as they are stored under in the archive, when
  657. the files in `records' are extracted the newer version of `blues'
  658. (which has the same name as the older) will overwrite the version
  659. stored first.
  660. FIXME: xref Keep Old Files
  661.  
  662. FIXME: --update wont take a directory argument if files that have been
  663. FIXME: archived from that directory are now no longer in it.  (I assume
  664. FIXME: because it looks in the archive first for the directory listing.)
  665. FIXME: this is a bug
  666.  
  667.    The simplest method of adding a file to an existing archive is the
  668. `--append' (`-r') operation, which writes files into the archive
  669. without regard to whether or not they are already archive members.
  670. When you use `--append' (`-r') you must use file name arguments; there
  671. is no default.  If you specify a file that is already stored in the
  672. archive, `tar' adds another copy of the file to the archive.
  673.  
  674.    If you have been following the previous examples, you should have a
  675. text file called `~/practice/rock' which has not been stored in either
  676. the archive file `~/practice/records', or the archive file `~/music'.
  677. To add `rock' to `records', first make `practice' the working directory
  678. (`cd practice').  Then:
  679.  
  680.    * Invoke `tar' and specify the `--append' (`-r') operation.
  681.  
  682.    * Specify the archive to which the file will be
  683.      added--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').
  684.  
  685.    * Specify the files to be added to the archive, using file name
  686.      arguments
  687.  
  688.    For example:
  689.  
  690.      % tar --append --file=records rock
  691.  
  692.    If you list the archive members in `records', you will see that
  693. `rock' has been added to the archive:
  694.  
  695.      % tar --list --file=records
  696.      blues
  697.      folk
  698.      jazz
  699.      rock
  700.  
  701. FIXME: this should be some kind of node.
  702.  
  703.    You can use `--append' (`-r') to keep archive members current with
  704. active files.  Because `--append' (`-r') stores a file whether or not
  705. there is already an archive member with the same file name, you can use
  706. `--append' (`-r') to add newer versions of archive members to an
  707. archive.  When you extract the file, only the version stored last will
  708. wind up in the file system.  Because `--extract' (`-x') extracts files
  709. from an archive in sequence, and overwrites files with the same name in
  710. the file system, if a file name appears more than once in an archive
  711. the last version of the file will overwrite the previous versions which
  712. have just been extracted.
  713.  
  714.    If you recall from the examples using `--compare' (`-d') above,
  715. `blues' was changed after the archive `records' was created. It is
  716. simple, however, to use `--append' (`-r') to add the new version of
  717. `blues' to `records':
  718.  
  719.      % tar --append --verbose --file=records blues
  720.      blues
  721.  
  722.    If you now list the contents of the archive, you will obtain the
  723. following:
  724.  
  725.      % tar --list -f records
  726.      blues
  727.      folk
  728.      jazz
  729.      rock
  730.      blues
  731.  
  732.    The newest version of `blues' is at the end of the archive.  When the
  733. files in `records' are extracted, the newer version of `blues' (which
  734. has the same name as the older) will overwrite the version stored
  735. first.  When `--extract' (`-x') is finished, only the newer version of
  736. `blues' is in the file system.
  737. FIXME: xref keep-old-files
  738.  
  739. 
  740. File: tar.info,  Node: Update bis,  Next: Concatenate bis,  Prev: Append bis,  Up: How to Add Files to Existing Archives
  741.  
  742. Updating Files in an Archive
  743. ----------------------------
  744.  
  745.      *(This message will disappear, once this node revised.)*
  746.  
  747.    While the `--append' (`-r') option is useful for updating files in an
  748. archive, to keep an archive current with `--append' (`-r') you must
  749. first use the `--compare' (`-d') or `--list' (`-t') options to determine
  750. what files have been changed (or be willing to waste space by adding
  751. identical copies of archived files to the ends of archives).  It is
  752. simpler to use the `--update' (`-u') operation, and let `tar' do the
  753. work for you.
  754.  
  755.    The `--update' (`-u') option causes `tar' to add files to the end of
  756. an archive, just like the `--append' (`-r') option.  When you invoke
  757. `tar' with the `--update' (`-u') option specified you must specify file
  758. name arguments.  Unlike `--append' (`-r'), the `--update' (`-u') option
  759. causes `tar' to check the archive to be updated to see if the specified
  760. file is already stored.  If the file (or one with the same name) is
  761. already in the archive, `tar' checks the modification date of the file
  762. in the archive and compares it to the file of the same name in the file
  763. system.  The file is only appended to the archive if it is new or if
  764. its modification date has changed to a later one.
  765. FIXME: xref After-Date
  766.  
  767.    To see the `--update' (`-u') option at work, create a new file,
  768. `classical', in your practice directory, and add a line to the file
  769. `blues', using any text editor.  Then invoke `tar' with the `--update'
  770. (`-u') operation and the `--verbose' (`-v') option specified, using the
  771. names of all the files in the practice directory as file name arguments:
  772.  
  773.      % tar --update --verbose --file=records blues folk rock classical
  774.      blues
  775.      classical
  776.      %
  777.  
  778. Because we have specified verbose mode, `tar' prints out the names of
  779. the files it is working on, which in this case are the names of the
  780. files that needed to be updated.  If you now invoke `tar' with the
  781. `--list' (`-t') operation specified, to generate a listing of the files
  782. in the archive, you will see that `blues' and `classical' have been
  783. added to its end.
  784.  
  785.    [The reason `tar' does not overwrite the older file when updating it
  786. is because writing to the middle of a section of tape is a difficult
  787. process.  Tapes are not designed to go backward.  Even if they were,
  788. imagine what would happen if the newer version were longer than the
  789. older one.]
  790.  
  791.    To keep archive members up to date with their counterparts of the
  792. same name in the file system, use the `--update' (`-u') option.  This
  793. adds a specified file to an archive if no file of that name is already
  794. stored in the archive.  If there is already an archive member with the
  795. same name, `tar' checks the modification date of the archive member,
  796. and adds the file only if its modification date is later.  If a file is
  797. stored in the archive but no longer exists under the same name in the
  798. active file system, `tar' reports an error.
  799.  
  800.    You could use the `--append' (`-r') option to keep an archive
  801. current, but do so you would either have to use the `--compare' (`-d')
  802. and `--list' (`-t') options to determine what files needed to be
  803. re-archived (which could waste a lot of time), or you would have to be
  804. willing to add identical copies of already archived files to the
  805. archive (which could waste a lot of space).
  806.  
  807.    You must use file name arguments with the `--update' (`-u')
  808. operation-if you don't specify any files, `tar' won't act on any files.
  809.  
  810.    To see the `--update' (`-u') option at work, create a new file,
  811. `~/practice/classical', and modify the file `~/practice/blues' (you can
  812. use a text editor, such as Emacs, to do both these things).  Then, with
  813. `practice' as your working directory, invoke `tar' with the `--update'
  814. (`-u') option, using the names of all the files in the practice
  815. directory as file name arguments, and specifying the `--verbose' (`-v')
  816. option:
  817.  
  818.      % tar --update --verbose --file=records blues folk rock classical
  819.      blues
  820.      classical
  821.      %
  822.  
  823.    Because you specified verbose mode, `tar' printed out the names of
  824. the files it acted on.  If you now list the archive members of the
  825. archive, (`tar --list --file=records'), you will see that the file
  826. `classical' and another version of the file `blues' have been added to
  827. `records'.
  828.  
  829.    Note: When you update an archive, `tar' does not overwrite old
  830. archive members when it stores newer versions of a file.  This is
  831. because archive members appear in an archive in the order in which they
  832. are stored, and some archive devices do not allow writing in the middle
  833. of an archive.
  834.  
  835. 
  836. File: tar.info,  Node: Concatenate bis,  Prev: Update bis,  Up: How to Add Files to Existing Archives
  837.  
  838. Concatenating Archives
  839. ----------------------
  840.  
  841.      *(This message will disappear, once this node revised.)*
  842.  
  843.    Rather than adding individual files onto the end of an archive, it
  844. may be more convenient to add archives themselves onto the end of an
  845. archive.  While it may seem intuitive to use `cat', the utility for
  846. adding files together, for this purpose, archives created by `tar'
  847. incorporate an end of file marker which must be removed if the
  848. concatenated archives are to be read properly as one archive
  849. FIXME: xref Ignore zeros.
  850.    To add archives to the end of another archive, therefore, you should
  851. use the `--concatenate' (`-A') operation.
  852.  
  853.    In earlier examples you created an archive file, `music', in your
  854. home directory.  You have, however, since changed the contents of the
  855. `practice' directory which was stored in that archive.  `records', the
  856. archive file in the `practice' directory, has recently been updated,
  857. and contains a current version of the files in `practice'.  Rather than
  858. update the contents of `music', let's add `records' to it.
  859.  
  860.    * Change into the home directory (`cd ..')
  861.  
  862.    * Invoke `tar', and specify the operation to add archives to the end
  863.      of another archive--`--concatenate' (`-A').
  864.  
  865.    * Specify the name of the archive file to be added
  866.      to--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').
  867.  
  868.    * Specify the file name arguments, which are, unusually, the names of
  869.      archive files.  Remember to include the directory name in the file
  870.      name, if the archive file is not in your working directory.
  871.  
  872.      % cd ..
  873.      % tar --concatenate --file=music practice/records
  874.  
  875.    Rather than list the new contents of `music', let's extract all the
  876. files and see what happens.
  877.  
  878.    To concatenate archive files, use the `--concatenate' (`-A') option.
  879. This operation adds other archives to the end of an archive. While it
  880. may seem intuitive to concatenate archives using `cat', the utility for
  881. adding files together, archive files which have been "catted" together
  882. cannot be read properly by `tar'.  Archive files incorporate an end of
  883. file marker-if archives are concatenated using `cat', this marker will
  884. appear before the end of the new archive.  This will interfere with
  885. operations on that archive.
  886. FIXME: xref ignore-zeros
  887.  
  888.    In earlier examples, you stored the `~/practice' directory in an
  889. archive file, `~/music'.  If you have been following the examples, you
  890. have since changed the contents of the `~/practice' directory.  There
  891. is a current version of the files in the `practice' directory, however,
  892. stored in the archive file `~/practice/records'.
  893.  
  894.    To store current versions of the files in `practice' in the archive
  895. file `music', you can use `--concatenate' (`-A') to add the archive file
  896. `~/practice/records' to `music'.  First, make sure you are in your home
  897. directory (`cd ~').  Then:
  898.  
  899.    * Invoke `tar', and specify the `--concatenate' (`-A') operation.
  900.  
  901.    * Specify the archive file to be added to--`--file=ARCHIVE-NAME'
  902.      (`-f ARCHIVE-NAME').
  903.  
  904.    * Specify the archives to be added, using file name arguments.  In
  905.      this case, the file name arguments are, unusually, the names of
  906.      archive files.  (Remember to include the path in the archive name,
  907.      if the archive file is not in your working directory.)
  908.  
  909.      % cd ~
  910.      % tar --concatenate --file=music practice/records
  911.  
  912.    If you now list the contents of the `music', you see it now contains
  913. the archive members of `practice/records':
  914.  
  915.      %tar --list --file=music
  916.      blues
  917.      folk
  918.      jazz
  919.      rock
  920.      blues
  921.      practice/blues
  922.      practice/folk
  923.      practice/jazz
  924.      practice/rock
  925.      practice/blues
  926.      practice/classical
  927.  
  928. 
  929. File: tar.info,  Node: How to Delete Members from Archives,  Prev: How to Add Files to Existing Archives,  Up: Tutorial
  930.  
  931. How to Delete Members from Archives
  932. ===================================
  933.  
  934.      *(This message will disappear, once this node revised.)*
  935.  
  936.    You can delete members from an archive using `--delete'.  Specify
  937. the name of the archive with `--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').
  938. List the member names of the members to be deleted.  (If you list no
  939. member names, then nothing will be deleted.)  The `--verbose' (`-v')
  940. option will cause `tar' to print the names of the members as they are
  941. deleted.  As with `--extract' (`-x'), it is important that you give the
  942. exact member names when using `tar --delete'.  Use `--list' (`-t') to
  943. find out the exact member names in an archive.
  944. FIXME: xref Listing Archives.
  945.  
  946.    The `--delete' option only works with archives stored on disk.  You
  947. cannot delete members from an archive stored on a tape.
  948.  
  949.    In some instances, it may be advantageous to remove some files from
  950. an archive stored on disk (it is never advantageous to delete files from
  951. an archive stored on tape--the linear nature of tape storage makes this
  952. action likely to scramble the archive).  You can use the `--delete'
  953. operation to remove files from an archive.  The names of files to be
  954. removed must be specified to `tar' as file name arguments.  All
  955. versions of the named file are removed from the archive.  Execution of
  956. the `--delete' operation can be very slow.
  957.  
  958.    To delete all versions of the file `blues' from the archive
  959. `records' in the `practice' directory, make sure you are in that
  960. directory, and then,
  961.  
  962.    * List the contents of the archive file `records' (see above for the
  963.      steps involved) to insure that the file(s) you wish to delete are
  964.      stored in the archive.  (This step is optional)
  965.  
  966.    * Invoke `tar' and specify the operation to delete files from an
  967.      archive (`--delete')
  968.  
  969.    * Specify the name of the archive file that the file(s) will be
  970.      deleted--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').
  971.  
  972.    * Specify the name(s) of the file(s) to be deleted, as file name
  973.      arguments
  974.  
  975.    * List the contents of the archive file again--note that the files
  976.      have been removed.  (this step is also optional)
  977.  
  978.      % tar --list --file=records
  979.      blues
  980.      folk
  981.      jazz
  982.      % tar --delete --file=records blues
  983.      % tar --list --file=records
  984.      folk
  985.      jazz
  986.      %
  987.  
  988.    In some instances, you may want to remove some files from an archive
  989. stored on disk
  990.  
  991.      *Caution:* you should never delete files from an archive stored on
  992.      tape-because of the linear nature of tape storage, doing this is
  993.      likely to scramble the archive.
  994.  
  995.    To remove archive members from an archive, use the `--delete'
  996. operation.  You must specify the names of files to be removed as file
  997. name arguments.  All versions of the named file are removed from the
  998. archive.
  999.  
  1000.    Execution of the `--delete' operation can be very slow.
  1001.  
  1002.    To delete all versions of the file `blues' from the archive
  1003. `records' in the `practice' directory, make sure you are in that
  1004. directory, and then:
  1005.  
  1006.    * List the contents of the archive file `records' (see above for the
  1007.      steps involved) to insure that the file(s) you wish to delete are
  1008.      stored in the archive.  (This step is optional)
  1009.  
  1010.    * Invoke `tar' and specify the `--delete' operation (`--delete').
  1011.  
  1012.    * Specify the name of the archive file that the file(s) will be
  1013.      deleted from--`--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME').
  1014.  
  1015.    * Specify the files to be deleted, using file name arguments.
  1016.  
  1017.    * List the contents of the archive file again--note that the files
  1018.      have been removed.  (this step is also optional)
  1019.  
  1020.      % tar --list --file=records
  1021.      blues
  1022.      folk
  1023.      jazz
  1024.      % tar --delete --file=records blues
  1025.      % tar --list --file=records
  1026.      folk
  1027.      jazz
  1028.      %
  1029.  
  1030. 
  1031. File: tar.info,  Node: Invoking tar,  Next: Basic tar Operations,  Prev: Tutorial,  Up: Top
  1032.  
  1033. Invoking GNU `tar'
  1034. ******************
  1035.  
  1036.      *(This message will disappear, once this node revised.)*
  1037.  
  1038. * Menu:
  1039.  
  1040. * Synopsis::
  1041. * Option Styles::
  1042. * Options::
  1043.  
  1044. 
  1045. File: tar.info,  Node: Synopsis,  Next: Option Styles,  Prev: Invoking tar,  Up: Invoking tar
  1046.  
  1047. General Synopsis of `tar'
  1048. =========================
  1049.  
  1050.    The usual way to invoke `tar' is:
  1051.  
  1052.      tar OPTION... [NAME]...
  1053.  
  1054.    You can actually type in arguments in any order, but in this manual
  1055. the options always precede the other arguments, to make examples easier
  1056. to understand.  Further, the option stating the main operation mode
  1057. (the `tar' "main command") is usually given first.
  1058.  
  1059.    There are surely many options to `tar', and three different style
  1060. for writing them: mnemonic options, short options, and old options.
  1061. These styles are discussed below.  Some options make sense with any
  1062. main command, while others are meaningful only with particular main
  1063. commands.  One option should state the main command, all others are
  1064. truly optional.
  1065.  
  1066.    Beware that `tar' options are case sensitive.  For example, {No
  1067. Value For "List"} or {No Value For "List"} options are not equivalent to
  1068. `--list' (`-t'), in fact, they do not even exist.  Options `-T' and
  1069. `-t' are different options, the first requires an argument for stating
  1070. the name of a file providing a list of NAMEs, the second does not
  1071. require an argument and is another way to write `--list' (`-t').
  1072.  
  1073.    Each NAME in the synopsis above is interpreted as an archive member
  1074. name when the main command is one of `--compare' (`-d'), `--delete',
  1075. `--extract' (`-x'), `--list' (`-t') or `--update' (`-u').  For all
  1076. other main commands, NAMEs are interpreted as the names of files
  1077. (including directories) in the file system.  `tar' interprets relative
  1078. file names as being relative to the working directory.
  1079.  
  1080.    `tar' will make all file names relative (by removing leading `/'s
  1081. when archiving or restoring files), unless you specify otherwise (using
  1082. the `--absolute-names' (`-P') option).
  1083. FIXME: xref File Name
  1084. Interpretation
  1085.    , for more information about `--absolute-names' (`-P').
  1086. FIXME: yet another node name that is probably wrong.
  1087.  
  1088.    The distinction between file names and archive member names is
  1089. especially important when shell globbing is used, and sometimes a
  1090. source of confusion for newcomers.  "Globbing" is the operation by
  1091. which "wildcard" characters, `*' or `?' for example, are replaced and
  1092. expanded into all existing files matching the given pattern.  The
  1093. problem is that shells may only glob using existing files in the file
  1094. system.  Only `tar' may glob on archive members, so when needed, you
  1095. must ensure that wildcard characters reach `tar' without being
  1096. interpreted by the shell first.  Using a backslash before `*' or `?',
  1097. or putting the whole argument between quotes, is usually sufficient for
  1098. this.
  1099.  
  1100.    Even if NAMEs are often specified on the command line, they can also
  1101. be read from a text file in the file system, using the
  1102. `--files-from=FILE-OF-NAMES' (`-T FILE-OF-NAMES') option.
  1103.  
  1104.    Each of the following subsection groups some options under a common
  1105. functionality.
  1106.  
  1107.    You can use `tar' to store files in an archive, to extract them from
  1108. an archive, and to do other types of archive manipulation.  The primary
  1109. argument to `tar', which is called the "operation", specifies which
  1110. action to take.  The other arguments to `tar' are either "options",
  1111. which change the way `tar' performs an operation, or "file names",
  1112. which specify the files `tar' is to act on.  The typical `tar' command
  1113. line syntax is:
  1114.  
  1115.    GNU `tar' returns only a few exit statuses.  I'm really aiming
  1116. simplicity in that area, for now.  If you are not using the `--compare'
  1117. (`-d') option, zero means that everything went well, besides maybe
  1118. innocuous warnings.  Nonzero means that something went wrong.  Right
  1119. now, as of today, "nonzero" is almost always 2, except for remote
  1120. operations, where it may be 128.
  1121.  
  1122. 
  1123. File: tar.info,  Node: Option Styles,  Next: Options,  Prev: Synopsis,  Up: Invoking tar
  1124.  
  1125. Many Styles for Options
  1126. =======================
  1127.  
  1128. * Menu:
  1129.  
  1130. * Mnemonic Options::
  1131. * Short Options::
  1132. * Old Options::
  1133. * Mixing Styles::
  1134.  
  1135. 
  1136. File: tar.info,  Node: Mnemonic Options,  Next: Short Options,  Prev: Option Styles,  Up: Option Styles
  1137.  
  1138. Mnemonic Option Style
  1139. ---------------------
  1140.  
  1141.    Each OPTION has at least one mnemonic option name starting with two
  1142. dashes in a row, v.g. `--list' (`-t').  The mnemonic option names are
  1143. more legible than the corresponding short or old option names, you may
  1144. prefer them if you highly praise clarity.  It sometimes happens that a
  1145. single mnemonic option has many different different names, which are
  1146. then synonymous.  In addition, mnemonic option names can be given unique
  1147. abbreviations.  For example, `--cre' can be used in place of `--create'
  1148. because there is no other mnemonic option which begins with `cre'.
  1149.  
  1150.    Some options require an argument.  This is the case of the
  1151. `--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME') option, which tells the name
  1152. of the `tar' archive.  The argument of a mnemonic option is usually
  1153. given right after the option itself, and introduced by an equal sign.
  1154. For example, the `--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME') option is
  1155. given the `archive.tar' file as argument by using the notation
  1156. `--file=archive.tar' for the mnemonic option.
  1157.  
  1158.    Mnemonic options are meant to be obvious and easy to remember,
  1159. possibly more so than their corresponding short options, below.  For
  1160. example:
  1161.  
  1162.      tar --create --verbose --block-size=20 --file=/dev/rmt0
  1163.  
  1164. gives a fairly good set of hints about what the command does, even for
  1165. those not fully acquainted with `tar'.
  1166.  
  1167. 
  1168. File: tar.info,  Node: Short Options,  Next: Old Options,  Prev: Mnemonic Options,  Up: Option Styles
  1169.  
  1170. Short Option Style
  1171. ------------------
  1172.  
  1173.    Most options, but not all of them, also have a short option name
  1174. starting with a single dash, and followed by a single character, v.g.
  1175. `-t'.  In fact, `-t' is exactly the short option name for the mnemonic
  1176. option `--list' (`-t'), both having exactly the same meaning.  The
  1177. forms are absolutely identical in function.
  1178.  
  1179.    The short option names are faster to type than mnemonic option names.
  1180. All along this manual, whenever a mnemonic option name is given, its
  1181. equivalent short option name follows between parentheses, if such a
  1182. short option name exists.
  1183.  
  1184.    Short options which require arguments use the immediately following
  1185. argument, so it may be thought as being merely introduced right after
  1186. it, usually separate by white space.  It is also possible to stick the
  1187. argument right after the short option name, using no intervening space.
  1188. So one might write `-f archive.tar' or `-farchive.tar' instead of
  1189. using `--file=archive.tar'.  Both `--file=ARCHIVE-NAME' and
  1190. `-f ARCHIVE-NAME' denote the option to give the archive a non-default
  1191. name, which in the example is `archive.tar'.  When the option is given
  1192. separately, its argument follows it, as is usual for Unix programs.
  1193. For example:
  1194.  
  1195.      tar -c -v -b 20 -f /dev/rmt0
  1196.  
  1197.    Short options letters may be lumped together, but contrary to old
  1198. options, they do not necessarily have to.  When short options are
  1199. nevertheless coalesced, use a single dash for them all.  Only the last
  1200. one in such a set is allowed to have an argument.  (Clustering many
  1201. options, the last of which taking an argument, seems to be fairly
  1202. opaque writing to me.  I would even like that GNU `getopt' be helpful
  1203. enough to make this illegal.)
  1204.  
  1205.    If you move short options in the command, be sure to move their
  1206. arguments along with them, if any.
  1207.  
  1208.