
cd into the directory containing the zip files
Run command
nano run.shAdd below code to run.sh file
#!/bin/bash
for z in *.zip
do
d=`basename $z .zip`
mkdir $d && unzip $z -d $d
done
Make it executable
chmod +x run.shRun it
./run.shIf you want to delete zip files after unzip, you only need to add
rm -rf $z after mkdir $d && unzip $z -d $d
No comments:
Post a Comment