This means that tar can take many files and combine
them all into one large file or write them out to a backup device such as
a tape drive. Once you have this one large file, you will often want to
compress it; the -z option is great for this. Hence, tar offers a great
way to distribute programs and data on the Internet, and you'll find that
it is used extensively for this purpose.
Here's a sample tar command line:
tar -zcvf myfiles.tar.gz /usr/local/bin
Let's take a look at how this command can be broken down:
tar
Name of the command.
-
Tells tar that options will follow.
z
Tells tar to use gzip compression automatically; if you use this,
it's good to add a .gz extension as well.
c
Tells tar to create a new archive.
v
This says to be verbose; that is, it tells tar to let you know
what it's doing while it creates the archive.
f
This indicates that the next thing on the command line is the name
of the file to be created or the device to be used. If I used
/dev/st0 here, for instance, it would write the backup to the tape
drive.
Pages:
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177