Unzip All Files In Subfolders Linux May 2026

In data management and development workflows, users frequently encounter scenarios where multiple .zip archives are stored within subfolders of a root directory. Extracting these files manually is inefficient and prone to error. The challenge lies in bridging the gap between the file system's hierarchical structure and the extraction utility's operational scope. This paper outlines robust solutions to automate the detection and extraction of these files.

If you have enabled globstar in bash, you can avoid find: unzip all files in subfolders linux

shopt -s globstar
for zip in **/*.zip; do
    unzip -o "$zip" -d "$zip%/*"
done

**/*.zip matches .zip files in all subdirectories recursively. $zip%/* extracts the directory part of the path. Most Linux distributions do not include unzip by default

find . -name "*.zip" -exec sh -c 'unzip -o "$0" -d "$(dirname "$0")" && rm "$0"' {} \;

Most Linux distributions do not include unzip by default. Install it using your package manager: Verify the installation: unzip -v

Verify the installation:

unzip -v