When many UNIX users think of file archives, on tape or in an archive
file, they think of the tar
There are other ways to make archives and handle tapes - including
This article summarizes articles about tar
-in this chapter and others.
is a t
one of its common uses is
making an archive file on disk (19.5
"pads" its archives with
NUL characters (51.3
archive files can be much bigger than the size of the
individual files put together.
The file can be compressed - so you may need to
uncompress an archive (19.7
can compress files while storing them.
If you make on-disk archives,
be careful with tar
(verbose) flag or you could end
up with a corrupted archive that holds
more than your files (19.8
With compression, a tar
can take less disk space (24.8
than compressing individual small files.
keeps most of a file's
information, it can make a
more complete copy (18.16
of a file or directory tree than utilities like cp
Yes, we do have articles about archives on tape.
Bruce Barnett's article
has enough information to make your own archive... although you might
need the details from article
After you've made an archive, you'll probably want to restore
it - at least as a test to be sure your archive is okay.
If there isn't a tape drive on your computer, read article
about using a drive on another computer.
If that isn't enough information, read the gory details from another of our
long-time UNIX and tape experts, Chris Torek, in article
a directory tree, recursively, from top to bottom.
What if you don't want to archive everything?
You can back up just some files by
combining ls -lt
Some versions of tar
have options for
including or excluding certain files and directories (20.8