: I need to make a backup of my home directory.
:
: I don't know the difference between tar and gzip but I wan't everything (every
: file, also in subdirectories) to be zipped into one file.
:
tar (stands for `tape archive') is for archiving files, and gzip is for compressing
stuff. You can use tar to make the single file archive of all you rstuff, and
then use gzip on the archive to compress it. If you're used to using something
like PKZIP, then you might be surprised to find out that there are programs that
do the steps separately.
: how do I write to make this happen assuming that I stand in the root of my
: homedirectory?
It's easy, so long as you don't try to write the archive into the area you're
archiving. So, you might write the archive in the /tmp area (or some other
public area that has the space) instead. You could use the following commands
from inside your home directory:
tar -zcvf /tmp/my_stuff.tar.gz *
mv /tmp/my_stuff.tar.gz .
The `zcvf' stands for: z - gzipped, c - create an archive, v - verbose mode (ie.
show what files are being archived), and f - whatever follows next is the archive
name. The `mv' command puts the archive into your home area.
Here's some advice that I hope will be even more helpful in the long run. Look
up this stuff in the documentation (ie., `tar --help', or `man tar', or `info tar',...)
and start getting familiar with these sources of information. Most of what you'll
need to know to run your system is right on your machine already. The syntax of
the docs takes some getting used to, but once you learn how to use them, you'll
be most of the way out of the newbie stage.
Cheers,
Robert Komar Physics Dept., Univ. of British Columbia, Canada
(stationed at the Sudbury Neutrino Observatory)
My mail address can be got from the following Unix command: