linux unzip excluding everything in the folder and underneath linux unzip excluding everything in the folder and underneath linux linux

linux unzip excluding everything in the folder and underneath


You need to quote the exclude pattern so that it is passed to unzip. Otherwise it will be expanded by the shell before being passed to unzip.

Try:

unzip patch2.zip -x "EXCLUDE/*"


@dogbane answer is right.

But I still add another [I hope] interresting option, as you are on linux:

mc  

(aka: Midnight Commander)

Start it, and then : on the Right panel, navigate to where you want your files to end up, and on the Left panel, navigate "inside" the ZIP file, and at that first level select + copy the things you need (ie, select all, and unselect the EXCLUDE folder, for example)

mc is VERY flexible and nice to use, especially to tar/untar/zip/move/delete/rename files... (on windows, an equivalent is TotalCommander, and I use its "synchronise" option very often to keep backups and origin in sync). It allow you to navigate archives as if they were uncompressed (trying to minimize the actual decompression to just the "navigating" part so you don't uncompress them twice).