2
votes
1answer
49 views

Linux Unzip with exclusions from .txt file

I have an unzipping script on Linux. It attempts to unzip with the command: unzip file.zip This is obviously successful. I now wish to exclude some files. The manual tells me of the -x option. I ...
12
votes
1answer
5k views

Remove single file from zip archive on Linux

I have a zip archive (created automatically in a script with -j -r flags) and I would like to remove a single file from it. I tried as documented. zip -d "picture_43_9.jpg" gallery.zip but I get ...
0
votes
1answer
88 views

Does Unzip only accept one criteria?

I am using unzip to extract files from a mass filer device where ZIP files are stored. unzip -o somefile.zip -c *somecriteria* -d somedirectory It works well but when I attempt to add another ...
3
votes
3answers
230 views

How to pass a file that changes name to another command in Bash?

I frequently use wget to download tarballs and zip files from the web, then either untar then or gunzip them. I do: wget google.com/somefile.zip unzip somefile.zip rm somefile.zip Is there a way ...
3
votes
3answers
892 views

Unzip file in bash where extracted folder name does not match zip file name

I have a shell script where I unzip a zip file and its contents will always be one folder. In my code I was assuming that the name of the zip file will be reflective of the folder name (e.g. folder ...