Browsing articles tagged with "7zip - Admins Goodies"
May 25, 2012
tom

Batch unzip .zip files using 7z [closed]

I have downloaded a large number of .zip files and need to extract them using 7z (p7zip) at the command line. 7z x filename0001.zip is successful, but 7z x *.zip returns a “No files to process” error. How can I unzip the files as a batch instead of one at a time? Asked by Miles Erickson for zip in *.zip; do 7z x “$zip” done Answered by Icydog Check more discussion of this question. Bookmark [...]

Continue Reading »
Aug 22, 2011
tom

get error “incorrect command line” when trying to extract 7zip archive on linux

I copied a large zip file to a Linux server, I didn’t realise at the time that it was a 7zip file. After some messing around I installed 7zip with “yum install p7zip” however when I try to extract the archive with 7za -x ./myarchive.zip I get the following output 7-Zip (A) 4.61 beta Copyright (c) 1999-2008 Igor Pavlov 2008-11-23 p7zip Version 4.61 (locale=C,Utf16=off,HugeFiles=on,1 CPU) Error: Incorrect command line Google is not my friend with [...]

Continue Reading »
Aug 15, 2011
tom

Automating compression tasks with 7-zip: Why does “Scanning” take so long?

I’ve automated a deployment, and used 7-zip to compress a directory as part of the automation. Whenever 7-zip comes to compress the directory, however, it seems to take a long time (over 60 seconds) at the start when it just says “Scanning” … it doesn’t seem to be adding files to the archive at this time. Also, its not using significant CPU time. It’s not a big directory; maybe 8 MB, and not an overly [...]

Continue Reading »
Aug 13, 2011
tom

Have a process which runs nightly to automatically zip old files?

I have a file share, and I want a process which enumerates files on that share and automatically creates a 7z self-extracting exe of files over 1 month old. On a different share, I want to create a 7z self-extracting exe of directories that are over 1 month old. Any idea if there is a program which can do this? I already have 7z a -t7z -mx9 -sfx filename.exe filename.txt Portion of it, just need [...]

Continue Reading »
Aug 12, 2011
tom

7z all files in directory, remove originals

I have some directories (linux machine) full of highly compressible *.foo files. Right now I just have a script that does gzip *.foo and it gzips each file into its own .gz file, and removes the original. 7z will compress these files to half the size that gzip will, so I’d like to switch to that. How can I use 7z to start with a directory like this file1.foo file2.foo file3.foo and end up with [...]

Continue Reading »
Aug 11, 2011
tom

how to use the -ax switch in 7z command?

I want to use the 7z command to compress some of files, but I want it to exclude some of the files. I tried the -ai, -ax, and -i switches, but no one seems to work. I need the compressed archive keep the directories, so I cannot use the find command to list the files I need and pass them to xargs. I think you want to use the -x switch. An example from the [...]

Continue Reading »