You can do something like:
for file in `ls *.zip`; do unzip -f $file; rm $file; done
We are looping through all the zip
files in the directory, unzipping it and then deleting it.
Note that the -f
option of zip
will overwrite any file without prompting if it finds a duplicate.
You need to run the above one-line command on the command line from the directory that has the all the zip files. That one line is equivalent to:
for file in `ls *.zip` # ls *.zip gets the list of all zip file..iterate through that list one by one.
do # for each file in the list do the following:
unzip -f $file # unzip the file.
rm $file # delete it.
done