You have a huge zip file with thousands of files in it. You want to extract a specific folder inside the zip, but you also want to exclude some files and folders from the extraction.
Assume that compressed_file.zip file contains the following folder and file structure:
You can check the zip content by unzip -l compressed_file.zip command.
You want to extract just path/to/extract/ folder, but want to exclude any folders under exclude folder.
unzip compressed_file.zip path/to/extract/* -x *exclude*
When you run the command above, you will only get the following content.
With the command above, only path/to/extract folders exist. Exclude folders do not exist.
By the way, the performance is lighting fast:) Enjoy!