| | |
Creating a zip
Thread Solved |
I didn't realize how to do this until just now so I thought I'd post about it. Suppose you have a directory on your box called "my_files" and you wish to compress it into a zip file. One level above the directory, use the following command
zip -r files.zip my_files/
that is so Windows...
Just kidding. That works great, but you can squeeze even more compression out of it if you use tar with bzip2 compression:
Zip might get about 2x compression, but I've seen bzip2 get anywhere from 2x to 5x compression. If space is a concern, then I'd check it out.
Just kidding. That works great, but you can squeeze even more compression out of it if you use tar with bzip2 compression:
tar -cvjf files.tar.bz2 my_files/
Zip might get about 2x compression, but I've seen bzip2 get anywhere from 2x to 5x compression. If space is a concern, then I'd check it out.
Alex Cavnar, aka alc6379
yeah, the whole difference with tar.gz and bzip2 is that bzip2 gives you more compression, so file sizes are small, but bzip2 is a lot more resource intensive when decompressing. So when size is an issue, use bzip2.
---------------------------------------
Insomnia: Becoming conscious of your own craziness
Insomnia: Becoming conscious of your own craziness
I usually use a shoe horn, some baby oil, and a really big mallet. :p
My Home Away from Home: Yet Another Linux Blog
![]() |
Similar Threads
- Problem updating zip file? (*nix Software)
- Creating zip File Equivalent to Java jar (Python)
- creating zip files (ASP.NET)
Other Threads in the *nix Software Forum
- Previous Thread: Red Hat 9 and Windows 2000 dual boot
- Next Thread: check this out
| Thread Tools | Search this Thread |







