Stuffit Deluxe is a great tool for most archiving duties, but not too good if you have a large number of individual file archives to create. I had this problem with uploading quiz results to individual students. To save space, I needed to ZIP each of 23 files and to do that with a GUI is pretty clumsy. However, I discovered that two CLI tools, zip and unzip, can make this job much easier.
unzip works just like you'd expect:
unzip [zipfilename]zip, on the other hand, took a little figuring out:
zip -h {...dumps online help listing}
zip [zipfilename] [file to zip] {...zips and retains the original file}
zip -m [zipfilename] [file to zip] {...zips and removes the original file}Best of all, I created a script called smush to help me out even more.# smush - a quick and dirty script to zip pdfsI cd to the directory, type smush and it all works automagically. Sweet!
for i in *.pdf
do
echo "zipping ${i}"
zip -m $i.zip $i
done
Mac OS X Hints
http://hints.macworld.com/article.php?story=20011105000356975