Questions tagged [zip]

For questions about ZIP files and associated tools. ZIP is a file format used for data compression and archiving.

Filter by
Sorted by
Tagged with
0
votes
1answer
26 views

What archival method (tar, zip, 7z, etc) allows me to retain folder modification dates on macOS?

I currently have a directory in a hard drive, say TopFolder which contains 3 subfolders, Folder1, Folder2, and Folder3. When I am in the top level directory of the hard drive, and do: tar cf TopFolder....
0
votes
0answers
22 views

Unzip: find a string and get inside filename [duplicate]

I have a list of zip files containing themselves multiple files. Like this : | archive-1.zip | file1.xml | file2.xml | file3.xml --> contains myStringToFind | file4.xml | archive-2....
0
votes
1answer
49 views

How to use multi-threading for creating and extracting tar.xz

I use tar -cJvf resultfile.tar.xz files_to_compress to create tar.xz and tar -xzvf resultfile.tar.xz to extract the archive in current directory. How to use multi threading in both cases? I don't ...
0
votes
2answers
29 views

How to download a zipfile from a Github repository

I'm trying to download a zipfile from a Github repository with this command: wget --no-check-certificate https://github.com/brendenlake/omniglot/blob/master/python/images_evaluation.zip -O /tmp/...
0
votes
1answer
49 views

Installing DHCPD on Arch Linux

I've installed Arch Linux today and am a bit of a noob at using it, so when I had done the installation my system would connect too my network fine, but after rebooting it stopped and gave me an error ...
0
votes
1answer
69 views

How to split larger zip file into smaller chunks using linux command [duplicate]

I have a zip file which is size of 1gb. I have to split this zip file into smaller chunks with the zip format of size 600mb. Tried below command: split -n 600m source.zip But output file is not in ...
0
votes
1answer
30 views

On MacOSX, *.zip can't match a-b.zip just ab.zip, how can I fix this?

I try to run sh fizmyzip.sh to remove some unnecessary files from all zip files under my current folder. fizmyzip.sh is: zip -d *.zip __MACOSX/\* zip -d *.zip "*/.DS_Store" However, it can'...
0
votes
1answer
33 views

How to provide a password as a variable to zip protected file?

I wish to unzip it using a variable to pass the password - instead of being prompted. I tried to use the parameter -P but it seems to be not working for me: [ora@hp_01 ZIP]$ zip -qT -P oracle test_zip....
0
votes
1answer
57 views

Backup Linux with Rsync & Send Backup Directory to Zip

Two Part Question PART ONE: I want to use the the following rsync command to back up my Ubuntu 18.04 file system starting at / during an Ubuntu Live Session (meaning my file sys), but I am not sure if ...
0
votes
1answer
34 views

How do I pass filenames with spaces in them to `zip`?

This feels like an incredibly simple task, but I can't get it to work. I want to put the first 13 files in a directory into a .zip archive. The obvious way to do this is zip first13.zip $(ls | ...
0
votes
1answer
46 views

After unzipping text files the format of contents are changed

I zipped a few text files and sent as attachments to my email. After extracting the text files, their format was changed. Before: line1 line2 line3 After: line1line2line3 Is there a way to keep the ...
0
votes
1answer
59 views

How to convert from rar or tgz to squashfs without having to extract to temporary folder?

I enjoy using squashfs for compression because of the simplicity of mounting them as loop devices to access the files inside. I have a lot of rar, tgz and zip files that I would like to convert to ...
1
vote
1answer
53 views

GNU parallel + gunzip (or 7z, or bsdtar, or unzip): extract every “archivename.zip” into (to-be-created) its “archivename” subfolder

As in title. I've got a lot of ZIP archives that I want to extract. All archives have their own unique name. All archives contain files only (inside archives there are NOT folder(s) at all: no ...
1
vote
2answers
71 views

Change permissions on a file in a zip without unzipping

Is there a way to modify permissions for a file in a zip without unzipping the file? For clarification, I am not asking to change the contents of the file, but the Unix permissions that are set on one....
0
votes
0answers
25 views

Move jar file into zip file folder without extracting the zip file

I have a jar file named as myJarFile.jar and have a zip file named as myZipFile.zip and inside there got myJarFile.jar. The structure of the myZipFile.zip is myZipFile.zip | |------ target ...
0
votes
1answer
44 views

How do I recursively tar+gzip folders with a specific name?

I have a large file structure with multiple nested folders. I would like to tar+gzip up every folder with a specific name and remove the original folder. In this example the script I hope to have ...
0
votes
0answers
30 views

Unable to unzip files in EMR which are downloaded from windows SFTP server

I am using below code to download the files from SFTP server & able to do it but I am facing problem when trying to unzip the downloaded files. Below is the code: #!/bin/bash sudo yum -y ...
4
votes
1answer
139 views

How to fix onedrive corrupt zips with a bash script

Currently onedrive generates zip files that are broken to most software. https://www.bitsgalore.org/2020/03/11/does-microsoft-onedrive-export-large-ZIP-files-that-are-corrupt As we can see here, the ...
0
votes
1answer
22 views

how create folder with data and add file and zip the folder

I need create folder with date and add some files into that folder and need to zip that folder. For example I have directory called A which has files like pandi_yyyymmdd.csv, vino_YYYYMMDD.csv I ...
0
votes
0answers
26 views

bash unzip partial directory structure from zip file

Clients submit large (1.5gigs, >10,000 files) zip files with their directory structure from clients' OUTPUT directory. I want to bash unzip to my INPUT directory, preserving their directory structure ...
0
votes
1answer
73 views

zip/compress a .bin file

I have a .bin file size of 8MB; is it possible to compress it or zip it? Tried with 7z but 8MB -> 7.90 MB so any relevant changes. Is there any other tools? Or simply is it not possible?
0
votes
1answer
25 views

Unzip files into a new directory

I am using Manjaro Gnu/Linux and have a problem. I have a directory named files, and under this directory, I have around 650 zip files, with names such as: file1.zip, file2.zip, file3.zip,... I want ...
0
votes
1answer
40 views

After unzipping, some files are missing

I compressed a large number of small files (6102 pdf&txt files) on Ubuntu 16.04 using the default compression tool with right click and uploaded the zip file to net disk. However, after others ...
0
votes
0answers
10 views

Create okular document archive using content.xml and metadata.xml files

It seems .okular files are zip files. [op@localhost okular-test]$ file kahneman.okular kahneman.okular: Zip archive data, at least v2.0 to extract Inflating this, [op@localhost temp]$ ...
0
votes
2answers
80 views

Zipping all files in a folder but excluding all subfolders

I would like to zip all files in a given folder but none of the directories: any idea on how to do it? e.g. directory X contains files F1 and F2 and directories D1 and D2. How can I zip directory X ...
0
votes
1answer
23 views

What is the expected behavior of unzipping a folder with many directories

I have a zipped folder with many directories and I am wondering how would they be unzipped if I were to execute the unzip command with no arguments. An example would be: home |---user1 |---dir1 ...
0
votes
1answer
90 views

How to automatically input zip passwords in unzip command in bash script

I want to test 10 passwords against a zip file. If i type: unzip file.zip the output is: Archive: file.zip [file.txt] file.txt password: I want to create a bash script that test 10 passwords. How ...
0
votes
0answers
23 views

How to copy files from linux rhel6 to another rhel6 (which are not connected)?

How to copy files or folders from linux rhel6 server to another (which are not connected) with same file or folder properties (especially symlinks) using zip? The only way is FTP to server1 and copy ...
0
votes
0answers
24 views

Cannot ignore directory using zip

I have this command: #!/usr/bin/env bash set -eo pipefail cd "$(dirname "$(dirname "$BASH_SOURCE")")" zip -9 -r zips/function.zip . \ -x '*.git*' -x '*.idea*' -x '*.idea*' \ -x */node_modules/...
0
votes
0answers
8 views

python2.7 zipfile test archive files

Currently I have this function which I use to extract a zip archive. import zipfile def unzip_t(path_to_archive_file, path_to_extract): if zipfile.is_zipfile(path_to_archive_file): with ...
1
vote
3answers
100 views

zip file with fat format (on linux)

I am trying to import contacts from micro-SD to (non Android) Nokia phone. So I first exported current contacts on micro-SD card in hope that i will be able to modify the exported file and then import ...
1
vote
1answer
71 views

Extract first 1000 lines of zip file

Using unzip I'm attempting to extract the first 1000 lines from an xml file. From reading How to partially extract zipped huge plain text file? I've used the answers to create: unzip -p my_feed.zip | ...
0
votes
2answers
288 views

Archive multiple zip files into one file

How can I combine multiple existing zip files into a single file? I'm asking because I have many PDFs to zip, and I want to leverage parallel to save time in zipping them all up (as in ls ./*.pdf | ...
0
votes
1answer
43 views

zipcmp in Synology NAS?

I want to compare a large zipped file in my Synology NAS to a copy of it I made that is on an external hard drive. I have heard zipcmp is good for this. However, if I am downloading zipcmp or ...
0
votes
1answer
52 views

How to list files and file sizes of a zip archive? [duplicate]

Suppose I have a ZIP archive myfiles.zip. To list the files inside the ZIP file, I could do zip -sf myfiles.zip, which results in: Archive contains: files/mypic.jpg files/myvideo.mp4 Total 2 ...
0
votes
1answer
183 views

How to burn .zip image to SD card from command line? [duplicate]

A dd solution is provided: unzip -p 2015-11-21-raspbian-jessie.zip 2015-11-21-raspbian-jessie.img | dd of=/dev/sdb bs=1M however dd is contra-indicated with the availability of cat. I would like to ...
1
vote
2answers
204 views

Using a regular expression with zip command for directory exclusions

I am trying to zip up my application and would like to exclude all of my image directories apart from one. Consider the following folder structure: /images │ └───/foo // exclude │ └───/bar // ...
0
votes
1answer
120 views

How may I emulate the -R feature of “zip”, but in gzip and xz?

The program "zip" has a -R feature which allows one to zip all files with a certain name in a directory tree: zip -r v/s zip -R For example: zip -R bigfile "bigfile" Will zip all of the following: ...
1
vote
0answers
579 views

zip warning: name not matched compressing folders

I'm trying to backup the whole volume of a drive. I want to have it password-protected This is what I did zip -er archive.zip /Volumes/Storage/ But I'm getting zip warning: name not matched ...
0
votes
1answer
45 views

Extract only sun tar.gz/zip

I have a zip/tar.gz that contain zip files that contains another zip file. For example: 1.zip contains 2.tar.gz and 3.zip. 3.zip contains 4.zip. I want to extract only 4.zip from 1.zip, I don't ...
13
votes
2answers
2k views

How can I create a zip archive without a file extension using the “zip” command?

Normally, to zip a directory, I can do something like this: zip -r archive.zip directory/ However, if I try to remove the extension from archive.zip like this: zip -r archive directory/ It ...
2
votes
1answer
48 views

zip - ignore a large list of specific files without overrunning the command line

I am trying to zip a directory, but I have a list of specific files that I need to ignore. This list is generated with a script and is quite long so when I pass them to the zip command I get an error ...
2
votes
3answers
840 views

Zip -r and wants to exclude/ignore files with no read permission

I have a folder with write-only files, and would like to exclude them while zipping. I don't want to see any warnings or errors related to those write-only files. Please let me know the best way to ...
0
votes
2answers
486 views

Compress many directories with up to 1000 files in archive

Trying all morning, but can't figure it out. Maybe you know. I'd like to compress many directories into zip files, so that each directory is its own zip file. And if there are more than 1000 files in ...
0
votes
1answer
122 views

Script with zip command doesn't work with wildcards

I created a bash shell script to zip all files that match a pattern as follows: #!/bin/bash zip $1 $2 When I run the above script using ./myScript.sh myzip test*, only one file that starts with the ...
1
vote
0answers
139 views

Unknown character encoding for zip file in archive manager

Forenote: I am quite new to Linux, and am really just a beginner. I have downloaded a zip file from a respectable-looking site with firefox; it should contain stuff to install an application. The zip ...
-1
votes
1answer
116 views

zip problem in shell script . Why it is wrong?

Write a shell script file_locker.sh to zip a file and protect such with a hashed password of a random generated PIN of specified length, while storing the PIN to a specified file. #!/bin/bash ...
1
vote
1answer
54 views

I want to use output of find command to unzip cmd

I need to use output of find / -type f -printf '%T@ %p\n' | sort -k1,1nr | head -1 command to a unzip command in shell script. Please help
1
vote
2answers
647 views

how to unzip a zipped file which include various zip level files in unix/linux? [duplicate]

For example my folder name is Test.zip Test.zip includes various zip folders like te1.zip, te2.zip , te3.zip even te1.zip include various zip folders. So i need to unzip in linux at once. Could ...
0
votes
1answer
370 views

Bash script to unzip a file — get error: Cannot Find or Open

Here is my script: Z=/var/pixel/sftp/gisftp/pixel_images/pixel_images_archive.zip if [ $Z ]; then echo "$Z exists" unzip $Z -d test else echo "$Z doesn't exist!" fi I get back this when ...

1
2 3 4 5
9