gzip multiple files

April 4, 2011 at 16:57:55
Specs: Deb/GNU 2.6.18-5-686, 2.6GHz/512MB
First post.

I'm backing up my docs, setting & /etc files to DVD for the first time.

As root, I copied my /home, /etc and /boot directories to a folder /BACKUP-COPIES-TEMP
on my desktop. The gzip man page doesn't make it clear to me what is the
correct bash command to compress the contents of this folder prior to creating the iso.

Do I gzip each file , e.g., /# gzip -r /home, or can I zip them with one line, e.g.,
/# gzip -r /home /etc /boot?

See More: gzip multiple files

Report •

April 6, 2011 at 14:20:06
I would suggest to use tar instead of gzip.
This allows you to create only one achive file and you can untar single files later, if needed, which is not possible when using gzip.

tar [options] archiv_file_name.tar.bz2 files_or_folders_to_backup
tar cvjf backup_2011_04_06.tar.bz2 /BACKUP-COPIES-TEMP

where the options are:
-c create a new archive
-v verbosely list files processed
-j filters the archive through bzip2
-f use archive file or device ARCHIVE

Click Here on HowTo ask good Question to get best Help
Let us know, if the problem is solved !!!

Report •
Related Solutions

Ask Question