Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

While trying to unzip a file named Joomla_3.0.3-Stable-Full_Package.zip to the directory named joomla I get filename not matched. Why is that ?

[root@Feddy Joomla]# unzip -Z Joomla_3.0.3-Stable-Full_Package.zip /opt/lampp/htdocs/joomla/
Archive:  Joomla_3.0.3-Stable-Full_Package.zip
caution: filename not matched:  /opt/lampp/htdocs/joomla/

Here is the screen cast of the directory :

enter image description here

(The joomla directory is empty)

share|improve this question
add comment

2 Answers

You can also get this when trying to specify the files to unzip and using a wildcard character. For example:

unzip -o somearchive.zip somedir/*

What may happen is that bash expands somedir/* to an actual existing dir and the files it contains. That list is then passed to unzip and it tries to find these files in the zip file.

To prevent this behavior just escape the * like this:

unzip -o somearchive.zip somedir/\*

Or, put the files to extract in double quotes:

unzip -o somearchive.zip "somedir/*"
share|improve this answer
add comment

The file name argument after the archive name specifies a file to extract. Use -d to specify the target directory:

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
    ...
    -d  extract files into exdir

Moreover, -Z is used to querying the archive, not extracting.

share|improve this answer
    
didn't get you. Can you please write the command –  Suhail Gupta Mar 9 '13 at 10:00
    
@SuhailGupta: unzip -d /opt/lampp/htdocs/joomla/ Joomla_3.0.3-Stable-Full_Package.zip, i.e. drop -Z, add -d. –  choroba Mar 9 '13 at 10:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.