My_big_zip_file.zip
我有一个具有以下文件结构的文件:
unzip -l My_big_zip_file.zip
产量:
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
我想把这些内容全部解压出来,/results/
但是当我运行
unzip My_big_zip_file.zip -d results
我收到一个不需要的文件夹级别:
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
那么如何避免My_big_zip_file/
在输出路径中出现?例如使结果为:
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