You may also want to look at the "zip" and "unzip" command-line utilities.

Also, "gzip" and "gunzip" are more common in the UNIX world; however, these compress single files only, they will not grab an entire folder, such as a bundle. To do that, you use gzip/gunzip in combination with "tar", which is an archiving tool.

To compress/create an archive:

tar cfz <archive-name>.tgz <input-file(s)>


To decompress/extract an archive into the current directory:

tar xfz <archive-name>


Note: tar stores filenames "as is". If you are in a directory, say /xyz/abc, and try this:


tar cfz mytarball.tgz def/qwerty/*

Then everything (incl. subdirs) in /xyz/abc/def/qwerty will be included in the archive, and extracting it as in:

% cd /lmnop
% tar xfz mytarball.tgz

will place those files into /lmnop/def/qwerty.  Similarly, doing this:

tar cvf mytarball.tgz /xyz/abc/def/qwerty/*

will archive the same files as the previous command, but now the same exact extraction command will place the files into /xyz/abc/def/querty, since absolute pathnames were used.


I think using tar in combination with gzip/gunzip yields better compression than zip/unzip, but I'd have to check again to be sure.


Note that the "z" (compress with gzip) option is not available with the versions of tar which ship with many commercial *NIXes; for these platforms you would compress/archive with:

tar cf - <source-file(s)> | gzip -c > <archive-name>

Note that the "stray" greater-than sign in this line is to redirect output and should be included (the paired < and > symbols should not be typed, obviously). So like this:

tar cf - def/querty/* | gzip -c > mytarball.tgz


And to decompress/extract:

gzip -c mytarball.tgz | tar xf -


On Dec 14, 2004, at 2:04 PM, Dar Scott wrote:


On Dec 14, 2004, at 11:10 AM, Trevor DeVore wrote:

ditto -x -k test.zip test

Is ditto on 10.1?

Dar Scott

****************************************
    DSC
    http://www.swcp.com/dsc/
    Programming Services
****************************************

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


-----------------------------------------------------------
Frank D. Engel, Jr.  <[EMAIL PROTECTED]>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
$




___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to