Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

weizilla

macrumors regular
Original poster
Feb 7, 2008
112
1
How do you add/update/remove a single file from an existing zip or rar (or any compressed) file on a mac?

In Windows, you have the Winzip/Winrar app which simply shows the contents of the file in an interface that you can drag files into and out of. I can't for the life of me find a similar app for Mac. All of the apps I found simply uncompresses the entire zip file with no interface whatsoever.

My problem essentially is that I'm changing files inside of a compressed file but it uses a specific format so I don't know how to recreate the compressed file. I can open and uncompress the file perfectly so normally on Windows, I can extract single files, change them and add them back with no problems.
 
Not sure about zip, but with tar:

Code:
 tar uvf <name of file>.tar <filename to update>

That will update the file in the tarball.

You can use:

Code:
tar --delete uvf <name of file>.tar <filename to remove>

to delete a file from a tarball.
 
The zip command line has a -d or --delete option as well, which will remove one or more files from an existing zip archive. Open a terminal window and type man zip for details ... a LOT of details :)
 
Not sure about zip, but with tar:

Code:
 tar uvf <name of file>.tar <filename to update>

That will update the file in the tarball.

You can use:

Code:
tar --delete uvf <name of file>.tar <filename to remove>

to delete a file from a tarball.

Is there any GUI application which can do what WinRAR/WinZip do on windoze?
I mean, OS X is famous for its GUI too, not only for the BSD heritage :p
 
Might be a little late but in case other people have this question, here is the answer:

If you are looking for a GUI that does it on Mac, BetterZip is a great app that shows you the content of a zip before unpacking and you can edit it. It also adds a plug in to the quicklook so you can preview the content of zip file. However it's an app that costs money.
If you don't want to spend money and you know a little bit about the terminal, then here is the terminal code for editing a zip file (it is also much faster than any GUI in case you need to edit large zip files).

navigate to your folder with terminal using the cd and ls command.
then:
zip -d <filename.zip> <file you want removed>
if you need to add/edit etc anything to a zip simply type zip in the terminal and it will give you the options
Is there any GUI application which can do what WinRAR/WinZip do on windoze?
I mean, OS X is famous for its GUI too, not only for the BSD heritage :p
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.