Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Best archival tools on the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Best archival tools on the command line
Authored by: dws on Nov 05, '01 04:37:06PM

Why not use a combination of tar and gzip? They're the best for quick archiving and compatible with Stuffit Expander.

tar -zcf archive.tar.gz [files.....]

then: tar -zxf archive.tar.gz, and you'll have all of your folders/files.

If you just want to compress files and not folders use gzip:

gzip filename

That gives you a file with the name filename.gz and your original is removed.

Say you wanted to find all .pdf files in a give directory and automatically compress them? No need for a shell script just do the following:

find /path/to/directory -name '*.pdf' -exec gzip {} ';'

After that all files named {something}.pdf will be gzipped up!



[ Reply to This | # ]