Eu tenho um arquivo My_big_zip_file.zip
com a seguinte estrutura de arquivos:
unzip -l My_big_zip_file.zip
rendimentos:
Archive: My_big_zip_file.zip
Length Date Time Name
--------- ---------- ----- ----
155274931 2018-01-16 14:30 My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201501).zip
96693995 2018-01-16 13:50 My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201403).zip
113751167 2018-01-16 14:10 My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201409).zip
158758696 2018-01-16 14:16 My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201410).zip
140706108 2018-01-16 13:24 My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201308).zip
142957976 2018-01-16 14:51 My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201505).zip
--------- -------
808142873 6 files
Desejo descompactar este conteúdo em /results/
, mas quando corro
unzip My_big_zip_file.zip -d results
Eu obtenho um nível de pasta indesejado:
inflating: results/My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201501).zip
inflating: results/My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201403).zip
inflating: results/My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201409).zip
inflating: results/My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201410).zip
inflating: results/My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201308).zip
inflating: results/My_big_zip_file/Level1_BasicFile_ProductID(254)_Date(201505).zip
Então, como evitar ter My_big_zip_file/
no caminho de saída? por exemplo. faça o resultado ser:
results/Level1_BasicFile_ProductID(254)_Date(201501).zip
results/Level1_BasicFile_ProductID(254)_Date(201403).zip
results/Level1_BasicFile_ProductID(254)_Date(201409).zip
results/Level1_BasicFile_ProductID(254)_Date(201410).zip
results/Level1_BasicFile_ProductID(254)_Date(201308).zip
results/Level1_BasicFile_ProductID(254)_Date(201505).zip