Author Topic: Console Commands For Zipping Files  (Read 3725 times)

znpp

  • Newbie
  • *
  • Posts: 8
    • View Profile
Console Commands For Zipping Files
« on: November 30, 2005, 07:58:50 am »
I have zip for the z version 2.3 installed on my C700 running Cacko 1.23 lite, but I can't figure out how to use it.

What is the proper syntax for zipping a file or files with zip 2.3?

When I write:
"zip test1.doc"

I get some of the following messages:
"Zip file structure invalid" or
"Nothing to do"

Unzipping files works like a charm, but I'd also like to be able to zip single or multiple files into a zip archive.

For example, how would I zip this file:

test1.doc

Or several files at the same time:

China1.doc
Fox2.xls
Bravo3.ppt
Tree4.txt

Thanks!
znpp

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
Console Commands For Zipping Files
« Reply #1 on: November 30, 2005, 09:31:51 am »
this zip work more like tar.  you must give it a name for the zipfile.

eg. zip test1.doc.zip test1.doc

to zip more files just tell it more names

eg. zip test1.doc.zip test1.doc China1.doc Fox2.xls Bravo3.ppt Tree4.txt
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Console Commands For Zipping Files
« Reply #2 on: November 30, 2005, 12:42:57 pm »
the traditional linux way is to chain tar and gzip thus:

tar cf - file1 file2 dir1 file 3 dir2 <etc> | gzip > mycompressedfile.tar.gz

to unpack

gzcat mycompressedfile.tar.gz | tar xf -
or
cat mycompressedfile.tar.gz | gunzip | tar xf -

(sometimes you have to use zcat not gzcat)

Paul
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
Console Commands For Zipping Files
« Reply #3 on: November 30, 2005, 12:51:03 pm »
correct.  A tarball is the norm for *nix, but if he wants to use the file on windows without third part apps then a zip file is the way to go.
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

znpp

  • Newbie
  • *
  • Posts: 8
    • View Profile
Console Commands For Zipping Files
« Reply #4 on: December 01, 2005, 03:08:41 am »
Thanks for the tip! Pretty simple once you know how to do it.

I have two more questions:

1. How do I view the contents of a zip archive without unzipping the whole thing?
2. How do I extract one or more individual files from a zip archive?

thx,
znpp

you must give it a name for the zipfile.
eg. zip test1.doc.zip test1.doc

to zip more files just tell it more names
eg. zip test1.doc.zip test1.doc China1.doc Fox2.xls Bravo3.ppt Tree4.txt