Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
PATH_PREFIX=/opt/upload/10k
zipinfo -1 100k.zip | grep -v /$ | head -10000 | while read curr_file
do
curr_dir=$(dirname ${curr_file})
if [[ ! -d ${PATH_PREFIX}/${curr_dir} ]]; then
mkdir -p ${PATH_PREFIX}/${curr_dir}
fi
unzip -j 100k.zip "${curr_file}" -d "${PATH_PREFIX}/${curr_dir}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment