[TriLUG] Archive Manager Could not Open Zipped file

Owen Berry oberry at trilug.org
Sat Oct 15 10:17:21 EDT 2005


Well, nobody seems to have answered this, and since I'm catching up
after being away, I'll have a go at it. Looking in the man page for the
zip command:

man zip
...
-r  Travel the directory structure recursively; for example:

         zip -r foo foo

  In this case, all the files and directories in foo are saved
  in a zip archive named foo.zip, including files  with  names
  starting  with  ".",  since  the  recursion does not use the
  shell's file-name substitution mechanism.  If  you  wish  to
  include only a specific subset of the files in directory foo
  and its subdirectories, use the -i  option  to  specify  the
  pattern of files to be included.  You should not use -r with
  the name ".*", since that matches ".."  which  will  attempt
  to  zip  up  the  parent  directory  (probably  not what was
  intended).

So it seems that what you asked zip to do was not really what you
wanted. When using zip, I usually just use: 'zip 2005_38.zip
2005_38/*.txt', for example, which is less confusing for me.

As for recovering your original files, you might try executing 'file
<filename>' from the command line. That should give you a better idea of
what the file is - it might just be the original file with a .zip
extension.

BTW, the zip program is not the standard method of compressing files in
the Unix/Linux world. The GNU file compression program, gzip, is very
much a standard in the Linux world. bzip2 is another, and compress is
available on many Unix systems. gzip only compresses a single file, so
if you want to make a compressed archive of multiple files, you can
archive multiple files into 1 file using the tar command. To shortcut
the whole process, you can get tar to compress the archive all in one
step by using the -z command line option. So, 'tar czvf foo.tar.gz foo'
will create a gzipped tar of the directory foo (and everything in it)
and name it foo.tar.gz.

Recommended reading:

man file
man tar
man gzip
man bzip2
man zip

Hope that helps.

Owen

On Tue, 2005-10-11 at 10:15 -0400, Bill Chan wrote:
> I used the command "zip -r * /home/bill/Projects/Oct" to zip up files in
> a directory. A .zip extension was added to all the files in that
> directory after the command was executed. However, when I used the
> Archive Manager to open any of the zipped file, I got this "An error
> occurred while loading the archive." error message.
> The Command Line Output message is as follows:
> [/home/bill/Projects/Oct/20051003/print_06.tif.zip]
>   End-of-central-directory signature not found.  Either this file is not
>   a zipfile, or it constitutes one disk of a multi-part archive.  In the
>   latter case the central directory and zipfile comment will be found on
>   the last disk(s) of this archive.
> note:  /home/bill/Projects/Oct/20051003/print_06.tif.zip may be a plain
> executable, not an archive
> unzip:  cannot find zipfile directory in one
> of /home/bill/Projects/Oct/20051003/print_06.tif.zip or
>         /home/bill/Projects/Oct/20051003/print_06.tif.zip.zip, and
> cannot find /home/bill/Projects/Oct/20051003/print_06.tif.zip.ZIP,
> period.
> 
> Now I cannot access to any of these file. Can someone help me to recover
> these files? I'm trying to move from Windows to Linux, it seems that I'm
> getting myself more troubles.
> 
> TIA,
> 
> -bill
> 




More information about the TriLUG mailing list