TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:18702] SQOTD (simple Q. of the day)



> So, what would I type to archive a users's entire home directory into a
> tar.gz?

tar -zcf username-archive.tgz /home/username

where "username-archive.tgz" is the name of the archive you want to create
(you could specify a complete path, e.g., /tmp/andy-archive.tgz),
"/home/username" would actually be the path to the directory containing
that user's home directory (assuming you want to package up his/her entire
directory.

Gnu tar lets you tar and compress in one command, so the option -z says to
gzip it. The -c to create the archive, and -f tells it that you're passing
the name of the file you want to create as the first argument.

Hope that does the job for you.

Andy

> 
> -Tim
> 
> --
> Tim Wilson      | Visit Sibley online:         | Check out:
> Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
> W. St. Paul, MN |                              | http://slashdot.org/
> wilson@visi.com |   <dtml-var pithy_quote>     | http://linux.com/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
>