Unzip a bunch of zips into their own directories

时间秒杀一切 提交于 2019-11-30 03:40:39
for file in *.zip
do
  unzip -d "${file%.zip}" $file
done
for zipfile in *.zip; do
    exdir="${zipfile%.zip}"
    mkdir "$exdir"
    unzip -d "$exdir" "$zipfile"
done
for x in $(ls *.zip); do
 dir=${x%%.zip}
 mkdir $dir
 unzip -d $dir $x
done
user3019558

Sorry for contributing to an old post, this works in cmd line for me and it was a life saver when I learnt about it

for file in $(ls *.zip); do unzip $file -d $(echo $file | cut -d . -f 1); done

Hey presto!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!