I have a ZIP archive, foo.zip, with some files not contained within a directory. I want to extract them to the local foo directory. I'm trying to extract them with this command:
unzip -v foo.zip -d ./foo
However, the output says it is not extracting:
caution: not extracting; -d ignored
Archive: foo.zip
Length Method Size Cmpr Date Time CRC-32 Name
-------- ------ ------- ---- ---------- ----- -------- ----
2345 Defl:N 1234 47% 2018-07-16 00:00 0123456f bar
... ... ... ... ... ... ... ...
-------- ------- --- -------
34567 23456 32% n files
Why is it ignoring the -d
argument and not extracting?
Best Answer
It’s not extracting because you used the
-v
option, which instructsunzip
to only show you the catalog of the archive, without extracting it.Since the
-d
option only makes sense when extracting, it warns you that it’s ignoring it, but it errs on the side of caution and doesn’t extract.