User:
Pass:
Remember me
zip cmdline utility
Zip isn't exactly my compression tool of choice but it is still the most widely used compression format out there, and comes in handy when you've got to send an archive to someone who has never even heard of 7z

Even before my switch over to linux on the desktop, I used a program called ZipGenius (ask google, I don't feel like searching for the link right now). It supports any compression format I could think of and was developed by the guy who created 7z...the best compression format I've come across to date.

Anyway, for bash scripting, and/or quick backups here's my notes on the zip cmdline utility.

to create a copy of my Pictures dir and store it in an archive named bak.zip:
zip -r ~/bak.zip ~/Pictures

Now if say I need more disk space and the dir Random inside my pics dir is over 4 gb and I don't view it all that much, I'd want to compress all of it and remove the uncompressed dir to save space:
zip -rm ~/Pictures/Random.zip ~/Pictures/Random

That would add the Random dir to Random.zip inside of my Pictures folder, and once the archive is complete, removes the Random dir to save space.
4.24.2008 01:45 am
No Comments
Post Comment
© 2006 Matt Linardy
top