I am using gdal to convert a whole bunch of pdf files to tif. That process takes a long time (about 1 - 5 minutes each) and I had a hundred or so to do. The pdf and tif are the same file name. I wanted to create an empty zip file to zip the tif into. The pdf gets thrown away. I zip the tif via Nemo gui.
Yes, I could have just created terminal commands to create the zip files while populating them. But I chose to do the work earlier while gdal was running, and the zip files going away (being moved to another directory after being populated) helped me keep track of where I was in the process.
This one worked perfectly:
Code: Select all
$ 7z a -i@/dev/null empty2.zip
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,6 CPUs AMD FX(tm)-6200 Six-Core Processor (600F12),ASM,AES-NI)
Scanning the drive:
0 files, 0 bytes
Creating archive: empty2.zip
Items to compress: 0
Files read from disk: 0
Archive size: 22 bytes (1 KiB)
Everything is Ok
$
And is perhaps better than the one I posted.
This one did not work on my LM 19.3:
Code: Select all
$ 7zz a empty1.zip @/dev/null
Command '7zz' not found, did you mean:
command '7z' from deb p7zip-full
command 'bzz' from deb djvulibre-bin
command 'ezz' from deb fex-utils
command 'zz' from deb fex-utils
command '7zr' from deb p7zip
command '7za' from deb p7zip-full
Try: sudo apt install <deb name>
$
I don't see 7zz in my Software Manager.
And this one did not work on my LM 19.3:
Code: Select all
$ python3 -m zipfile -c empty3.zip
Usage:
zipfile.py -l zipfile.zip # Show listing of a zipfile
zipfile.py -t zipfile.zip # Test if a zipfile is valid
zipfile.py -e zipfile.zip target # Extract zipfile into target dir
zipfile.py -c zipfile.zip src ... # Create zipfile from sources
$
I did read
zip -L
Thanks for all the help.
I am working a job now, so I won't be responding as fast. If you need a speedy response from me please quote my post. I will try to get to those a little quicker. Thank you.