unzip

Linux压缩和解压命令常见用法

陌路散爱 提交于 2019-12-10 06:56:16
.tar 解包:tar xvf FileName.tar 打包:tar cvf FileName.tar DirName (注:tar是打包,不是压缩!) ——————————————— .gz 解压1:gunzip FileName.gz 解压2:gzip -d FileName.gz 压缩:gzip FileName .tar.gz 和 .tgz 解压:tar zxvf FileName.tar.gz 压缩:tar zcvf FileName.tar.gz DirName ——————————————— .bz2 解压1:bzip2 -d FileName.bz2 解压2:bunzip2 FileName.bz2 压缩: bzip2 -z FileName .tar.bz2 解压:tar jxvf FileName.tar.bz2 压缩:tar jcvf FileName.tar.bz2 DirName ——————————————— .bz 解压1:bzip2 -d FileName.bz 解压2:bunzip2 FileName.bz 压缩:未知 .tar.bz 解压:tar jxvf FileName.tar.bz 压缩:未知 ——————————————— .Z 解压:uncompress FileName.Z 压缩:compress FileName .tar.Z

android unzip folder from zip file and read content from that folder

那年仲夏 提交于 2019-12-10 06:25:10
问题 in one of my app i need to extract a zip file that have folder inside and that folder contains images it mean abc.zip=>adb(folder)=>abc.png i want to extract image file i used below method private boolean extractFolder(File destination, File zipFile) throws ZipException, IOException { int BUFFER = 8192; File file = zipFile; //This can throw ZipException if file is not valid zip archive ZipFile zip = new ZipFile(file); // String newPath = destination.getAbsolutePath() + File.separator +

How to extract without first directory using Gradle?

做~自己de王妃 提交于 2019-12-10 03:04:18
问题 I am trying extract a dependant zip file without the PARENT directory, exclude some file while extracting using Gradle. Here is what I've got and this works but doesn't feel right and I am hoping there is a better way to do this Zip file that i am extracting jar tf parent-folder-name.zip parent-folder-name/bin/something.sh parent-folder-name/bin/something.bat parent-folder-name/lib/somelib.jar Option 1 task explodeToDist1(type: Copy) { from zipTree(configurations.extractDist.singleFile)

Check if a directory exists in a zip file with Python

≡放荡痞女 提交于 2019-12-09 15:36:36
问题 Initially I was thinking of using os.path.isdir but I don't think this works for zip files. Is there a way to peek into the zip file and verify that this directory exists? I would like to prevent using unzip -l "$@" as much as possible, but if that's the only solution then I guess I have no choice. 回答1: Just check the filename with "/" at the end of it. import zipfile def isdir(z, name): return any(x.startswith("%s/" % name.rstrip("/")) for x in z.namelist()) f = zipfile.ZipFile("sample.zip",

download a zip file to a local drive and extract all files to a destination folder using python 2.5

一个人想着一个人 提交于 2019-12-08 23:34:27
问题 I am trying to download a zip file to a local drive and extract all files to a destination folder. so i have come up with solution but it is only to "download" a file from a directory to another directory but it doesn't work for downloading files. for the extraction, I am able to get it to work in 2.6 but not for 2.5. so any suggestions for the work around or another approach I am definitely open to. thanks in advance. ###################################### '''this part works but it is not

How to publish html report inside VSTS

六月ゝ 毕业季﹏ 提交于 2019-12-08 20:42:47
I have a simple batch (let's call it run_job.bat ) job that I set up in VSTS as release definition . VSTS reads this file from the remote git repository that is also set up in VSTS. The agent is configured on a remote machine to access certain folder, say C:\AllScans\FolderWhereScanIsRunning\ bring the necessary batch file in there and start the run. The job runs some scan against web application and generates report file with some unknown for me extension. Another job then runs as queue in VSTS (let's call it run_report.bat ) that transforms this unckown file to zip file where .html , .css

How to unzip into specific directory without recreate all the path with bash script

醉酒当歌 提交于 2019-12-08 16:29:28
问题 In my ios application, I need to unzip an archive that is placed into /var/mobile/Library/Preferences/xxx into, for example, /var/mobile/Library/Preferences/tmp. My issue is that when I launch this: unzip /var/mobile/Library/Preferences/xxx/archive.zip -d /var/mobile/Library/Preferences/tmp/ in the tmp folder, there is all the archive path: /var/mobile/Library/Preferences/tmp/var/mobile/Library/Preferences/xxx/archive/... How could I do for only have /var/mobile/Library/Preferences/tmp

r function unzip error 1 in extracting from zip file

社会主义新天地 提交于 2019-12-08 15:15:21
问题 Environment: Windows 7 OS RStudio Version 0.99.491 I have been programming in R for about 4 months via the Coursera Data Science curriculum, but I have NEVER been successful in using the unzip function. I've looked at the forums for hours for potential solutions, syntax problems, undefined arguments, etc., but to no avail. I eventually unzip the contents manually and proceed with the assignment, but I am tired of not knowing why it is not working. Here are a few examples of the error:

unzip archive with subfolders in java?

∥☆過路亽.° 提交于 2019-12-08 11:01:47
问题 I am trying to unzip an archive (test.zip) containing a subfolder with some png images: test.zip | -> images | -> a.png | -> b.png Here is what I do: public static void unzip(String archive, File baseFolder, String[] ignoreExtensions) { FileInputStream fin; try { fin = new FileInputStream(archive); ZipInputStream zin = new ZipInputStream(fin); ZipEntry ze = null; while ((ze = zin.getNextEntry()) != null) { if (ignoreExtensions == null || !ignoreEntry(ze, ignoreExtensions)) { File

How to zip 100 mb files during (before) upload so that upload speed can be increased? [duplicate]

佐手、 提交于 2019-12-08 07:59:36
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: HTML Compress File Upload? I have complains from client that my website is taking more time to upload the 100 MB time (I know it bound to take more time because of this size), hence I am planning to upload files such that they get zipped before upload and gets uploaded to desired location and then gets unzipped along with the deletion of that zipped format uploaded file. So can anyone suggest me how to proceed