I have files such as these
a1.tif
a2.tif
a1.zip
sa.zip
ff.zip
wqqq.zip
I am getting this
unzip /*zip
unzip: cannot find or open /*zip, /*zip.zip or /*zip.ZIP.
You are searching for anything in the root directory that ends with "zip". Use *.zip
for any file in the current directory ending in ".zip", or more explicitly use ./*.zip
, ./
being the current directory.
That said, if you have more than one match it will pass all of them to the unzip
command with the first being interpreted as the archive file and the remaining matches as files to extract from the archive. Avoid this by using find to pass each match to unzip
.
find . -name '*.zip' -exec unzip {} \;