| 1 | .TH TAR 1 |
| 2 | .SH NAME |
| 3 | tar \- tape archiver |
| 4 | .SH SYNOPSIS |
| 5 | .B tar |
| 6 | [ key ] [ name ... ] |
| 7 | .SH DESCRIPTION |
| 8 | .I Tar |
| 9 | saves and restores files |
| 10 | on magtape. |
| 11 | Its actions are controlled by the |
| 12 | .I key |
| 13 | argument. |
| 14 | The |
| 15 | .I key |
| 16 | is a string of characters containing |
| 17 | at most one function letter and possibly |
| 18 | one or more function modifiers. |
| 19 | Other arguments to the command are file or directory |
| 20 | names specifying which files are to be dumped or restored. |
| 21 | In all cases, appearance of a directory name refers to |
| 22 | the files and (recursively) subdirectories of that directory. |
| 23 | .PP |
| 24 | The function portion of |
| 25 | the key is specified by one of the following letters: |
| 26 | .TP 8 |
| 27 | .B r |
| 28 | The named files |
| 29 | are written |
| 30 | on the end of the tape. |
| 31 | The |
| 32 | .B c |
| 33 | function implies this. |
| 34 | .TP 8 |
| 35 | .B x |
| 36 | The named files are extracted from the tape. |
| 37 | If the named file matches a directory whose contents |
| 38 | had been written onto the tape, this directory is (recursively) extracted. |
| 39 | The owner and mode are restored (if possible). |
| 40 | If no file argument is given, the entire content of the |
| 41 | tape is extracted. |
| 42 | Note that if multiple entries specifying the same file |
| 43 | are on the tape, the last one overwrites |
| 44 | all earlier. |
| 45 | .TP 8 |
| 46 | .B t |
| 47 | The names of the specified files are listed each time they occur |
| 48 | on the tape. |
| 49 | If no file argument is given, |
| 50 | all of the names on the tape are listed. |
| 51 | .TP 8 |
| 52 | .B u |
| 53 | The named files are added to the tape if either they |
| 54 | are not already there or have |
| 55 | been modified since last put on the tape. |
| 56 | .TP 8 |
| 57 | .B c |
| 58 | Create a new tape; writing begins on the beginning |
| 59 | of the tape instead of after the last file. |
| 60 | This command implies |
| 61 | .B r. |
| 62 | .PP |
| 63 | The following characters may be used in addition to the letter |
| 64 | which selects the function desired. |
| 65 | .TP 10 |
| 66 | .B 0,...,7 |
| 67 | This |
| 68 | modifier selects the drive on which the tape is mounted. |
| 69 | The default is |
| 70 | .BR 1 . |
| 71 | .TP 10 |
| 72 | .B v |
| 73 | Normally |
| 74 | .I tar |
| 75 | does its work silently. |
| 76 | The |
| 77 | .B v |
| 78 | (verbose) |
| 79 | option causes it to type the name of each file it treats |
| 80 | preceded by the function letter. |
| 81 | With the |
| 82 | .B t |
| 83 | function, |
| 84 | .B v |
| 85 | gives more information about the |
| 86 | tape entries than just the name. |
| 87 | .TP 10 |
| 88 | .B w |
| 89 | causes |
| 90 | .I tar |
| 91 | to print the action to be taken followed by file name, then |
| 92 | wait for user confirmation. If a word beginning with `y' |
| 93 | is given, the action is performed. Any other input means |
| 94 | don't do it. |
| 95 | .TP 10 |
| 96 | .B f |
| 97 | causes |
| 98 | .I tar |
| 99 | to use the next argument as the name of the archive instead |
| 100 | of /dev/mt?. |
| 101 | If the name of the file is `\-', tar writes to |
| 102 | standard output or reads from standard input, whichever is |
| 103 | appropriate. Thus, |
| 104 | .I tar |
| 105 | can be used as the head or tail of a filter chain |
| 106 | .I Tar |
| 107 | can also be used to move hierarchies with the command |
| 108 | .ce 1 |
| 109 | cd fromdir; tar cf - . | (cd todir; tar xf -) |
| 110 | .TP 10 |
| 111 | .B b |
| 112 | causes |
| 113 | .I tar |
| 114 | to use the next argument as the blocking factor for tape |
| 115 | records. The default is 1, the maximum is 20. This option |
| 116 | should only be used with raw magnetic tape archives (See |
| 117 | .B f |
| 118 | above). |
| 119 | .TP 10 |
| 120 | .B l |
| 121 | tells |
| 122 | .I tar |
| 123 | to complain if it cannot resolve all of the links |
| 124 | to the files dumped. If this is not specified, no |
| 125 | error meesages are printed. |
| 126 | .PP |
| 127 | .SH FILES |
| 128 | /dev/mt? |
| 129 | .br |
| 130 | /tmp/tar* |
| 131 | .SH DIAGNOSTICS |
| 132 | Complaints about bad key characters and tape read/write errors. |
| 133 | .br |
| 134 | Complaints if enough memory is not available to hold |
| 135 | the link tables. |
| 136 | .SH BUGS |
| 137 | There is no way to ask for the |
| 138 | .IR n -th |
| 139 | occurrence of a file. |
| 140 | .br |
| 141 | Tape errors are handled ungracefully. |
| 142 | .br |
| 143 | The |
| 144 | .B u |
| 145 | option can be slow. |
| 146 | .br |
| 147 | The |
| 148 | .B b |
| 149 | option should not be used with archives that are |
| 150 | going to be updated. The current magtape driver cannot |
| 151 | backspace raw magtape. |
| 152 | If the archive is on a disk file the |
| 153 | .B b |
| 154 | option should not be used at all, as updating |
| 155 | an archive stored in this manner can destroy it. |
| 156 | .br |
| 157 | The current limit on file name length is |
| 158 | 100 characters. |