I m trying to unzip "Data.zip" into the current directory using:

unzip Data.zip

But i get a prompt:

Archive: Data.zip
replace /home/jaggib/Data.zip? [y]es, [n]o, [A]ll, [N]one, [r]ename:'

It looks to me that it is creating archive instead of uncompressing it.

I tried to specify a destination directory, but that gives the same result.

I am using Ubuntu 13.10. Am not following the syntax correctly or is there an additional argument that i have to use.


1 Answer 1


The file itself probably has a file (or a directory) in it called "Data.zip" and therefor prompts you on what to do.Do this:

unzip Data.zip -d tmp/

It will create directory tmp/ and extract the files in that directory. Since that directory does not have a Data.zip it will extract without a warning.

  • Thanks, thats exactly what was happening. I found that the zip command that i was using 'zip -r --filesync --quiet /home/jaggib/Data.zip Data.zip' was actually creating zip within zip.
    – jsbisht
    Nov 16, 2013 at 18:44
  • can you suggest whats wrong with my zip command?
    – jsbisht
    Nov 16, 2013 at 18:45
  • Hmm nothing wrong but you do do a weird thing. If you do it like that you have a data.zip on disc and make a zipped file named data.zip that has data.zip in it. Restoring is possible but you can use the -d option as shown to keep the zip and get the zip from the zip (this is getting weird ;) )
    – Rinzwind
    Nov 16, 2013 at 18:48
  • Yeah. I get the unzipping part. But i am wondering, how do i sync the files on my current directory zip to the zip in my home directory, using the zip command. So that i dont get 'Data.zip' getting wrapped under the new 'Data.zip' after the zip command.
    – jsbisht
    Nov 16, 2013 at 18:54
  • I would use another name for the zip command. Use the name data2.zip to zip the files (including data.zip)(?)
    – Rinzwind
    Nov 16, 2013 at 19:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .