As part of a scripted software installation on Xenial Xerus I have a zipped archive called 'test.zip' that contains, among other files, some files in a sub-directory called samples
:
andrew@athens:~/Desktop$ unzip -l test.zip
Archive: test.zip
Length Date Time Name
--------- ---------- ----- ----
0 2016-09-15 13:29 materials/
66 2014-11-16 18:22 materials/preferences.kcfgc
21554 2014-11-16 18:22 materials/mainwindow.cpp
166 2016-09-15 13:29 materials/.zip
164 2014-11-16 18:22 materials/Messages.sh
0 2016-09-15 13:28 samples/
35147 2014-11-16 18:22 samples/LICENCE
631 2014-11-16 18:22 samples/README.md
2344 2014-11-16 18:22 samples/main.cpp
--------- -------
60072 9 files
andrew@athens:~/Desktop$
Using Xenial Xerus's commandline unzip
utility how do I extract the contents only of samples
, decompressing them to /tmp
?
The command would be to extract with folder names (default behavior):
without folder names (extracting files only contained in samples folder):
From
man unzip
:Hope this helps!