Posted: Fri Sep 08, 2006 7:26 pm Post subject: how do I put the uncompressed .odt file back together?
I would like to put back together a .odt file I just unziped, however I cannot do it. I tried using gzip, gunzip, tar, and a few others on I found on version tracker.
Yeah, if you don't have zip on your Mac, something's awry with your OS install
If you go to the /Applications/Utilities/Terminal and type
Code:
which zip
and press return, what do you see?
You *might* be able to use Mac OS X's "Create Archive of" option to recreate a valid file, but the chances of it ending up as a valid .odt file aren't great (based on how that thing works)....
Alternatively, the old standard Zipit (shareware) should work, but you'll still have to select the correct options (no MacBinary, etc.)....
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Some Background:
After reading the articles I mentioned above I first typed
Code:
man zip
just to make sure I had the right options/switches since the articles were specific to Linux. From that I got the response:
Code:
No manual entry for zip
Then I tried to locate all crompressing programs:
Code:
apropos zip
bzcmp(1), bzdiff(1) - compare bzip2 compressed files
bzgrep(1), bzfgrep(1), bzegrep(1) - search possibly bzip2 compressed files for a regular expression
bzip2(1), bunzip2(1) - a block-sorting file compressor, v1.0.2 bzcat - decompresses files to std
out bzip2recover - recovers data from damaged bzip2 files
bzmore(1), bzless(1) - file perusal filter for crt viewing of bzip2 compressed text
gzip(1), gunzip(1), zcat(1) - compress or expand files
zforce(1) - force a '.gz' extension on all gzip files
That is why I used gzip, gunzip and even tried tar and the Archive option from the OS; of which, none worked.
Anyway, I tried using zip and I have not gotten it to work for me, when I tried
Code:
zip test.odt\ Folder/
I got
Code:
zip error: Nothing to do! (test.odt Folder/.zip)
Same result if I used the -r option, and appending the * character only compresses the files individually.
Therefore what is the correct command to zip the folder contents into one file?
Isn't it included with the Developer Tookit that is on the Mac OS X CDs/DVD that comes with a new Mac? Or is it called X Code now? Anyway, when you get it on your machine it should be/go in Folder usr/bin. usr/ is invisible but can be reached thru Finder--> Go--> Go to Folder... (just type in usr/ or usr/bin)
From my experience, since you don't get the normal result for man zip which should basically explain how to use zip commands that tells me maybe zip isn't in usr/bin. I'm pretty sure zip blah blah blah path-to-file entered in a Terminal.app window should be zipping the file. I hosed my system recently and had to start over from my 10.2.3 CD and then upgraded to 10.2.8. I don't have zip in my /usr/bin as a result but I can grab it from one of my Previous Systems in my Previous Systems Folder that is created when one archives and (re)installs. I know I should get rid of those PS's as they take up space but I always find myself going back to get things from there that I had added to my system after an install/reinstall. My point is, maybe it isn't part of the basic install or at least wasn't back at that OS X version. I have Dev Tools though (XCode now) so I think that's where my zip binary file came from originally.
Another way is to Google and d/l an app called Zippist and zip with that or a similar program.
Zip is one of those programs that doesn't have a man page.
Code:
zip -h
gets you zip usage
If you have all the exploded contents in a folder "foo",
Code:
cd foo
zip -r mynewzip.sxw *
will do what you want.
.DS_Store files and Mac metadata seem not to make a difference here (they break images.zip, for instance), so the Mac OS X "create archive" command seems to work, too.
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
OK, Smokey, since you're a Guru here, I'll take your word for it. Could have sworn I had seen it before though. Anyway, from Panther (10.3) on that Finder drop down option is included which is nice, but in Jaguar (10.2) I had to add something called On My Command which let's me do zipping and a bunch of otehr cool stuff by right-clicking on a file/folder (Control-clicking for the Mac faithful one-button purists).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum