On Tue, Feb 20, 2007 at 03:12:57PM +0000, Robert Rothenberg wrote:
> 
> Take the following zip file
> 
> $ unzip -l foo
> Archive:  foo.zip
>   Length     Date   Time    Name
>  --------    ----   ----    ----
>         0  02-20-07 15:05   foo/
>         0  02-20-07 15:05   foo/file1
>         0  02-20-07 15:05   foo/bar/
>         0  02-20-07 15:05   foo/bar/file2
>  --------                   -------
>         0                   4 files
> 
> 
> Now try this:
> 
> $ unzip -l foo foo/*
> Archive:  foo.zip
>   Length     Date   Time    Name
>  --------    ----   ----    ----
>         0  02-20-07 15:05   foo/file1
>  --------                   -------
>         0                   1 file
> 
> Oh, but what if I also want to list all files below foo?  There's no
> equivalent -r option for recursive.  So I cannot list or extract files in
> foo/bar without specifying them manually.


That's not what I get:

  $ unzip -l foo.zip 
  Archive:  foo.zip
    Length     Date   Time    Name
   --------    ----   ----    ----
          0  02-20-07 16:35   foo/
          0  02-20-07 16:35   foo/file1
          0  02-20-07 16:35   foo/bar/
          0  02-20-07 16:35   foo/bar/file2
   --------                   -------
          0                   4 files

  $ unzip -l foo.zip foo/*
  Archive:  foo.zip
    Length     Date   Time    Name
   --------    ----   ----    ----
          0  02-20-07 16:35   foo/
          0  02-20-07 16:35   foo/file1
          0  02-20-07 16:35   foo/bar/
          0  02-20-07 16:35   foo/bar/file2
   --------                   -------
          0                   4 files


However:

  $ unzip foo
  Archive:  foo.zip
     creating: foo/
   extracting: foo/file1               
     creating: foo/bar/
   extracting: foo/bar/file2           

  $ unzip -l foo.zip foo/*
  Archive:  foo.zip
    Length     Date   Time    Name
   --------    ----   ----    ----
          0  02-20-07 16:35   foo/file1
   --------                   -------
          0                   1 files



Perhaps you suffer from the fact that your shell is expanding the *?



Abigail

Attachment: pgp9ugYD4YkCu.pgp
Description: PGP signature

Reply via email to