0

I have more than 100.000 pdf files I want to decompress it, then recompress theme all in one archive file to save space. all i found is:

ls | xargs -P 4 -n 1 -I {} qpdf --stream-data=uncompress {} /tmp/RAM/{}

then

tar -c /tmp/RAM | xz > archive.tar.xz

any solution please ?

1
  • Have you run tests whether the PDFs are indeed smaller, and whether they are still usable? In order to get the smallest possible PDF, you'd have to interpret and properly recreate the PDF, getting rid of all kind of junk in the document (the simplest example is doing a Save as… in Acrobat).
    – Max Wyss
    Aug 4, 2015 at 21:42

1 Answer 1

0

In linux, you can use tmpfs which is a in-memory filesystem, but be careful as it might be too small for you to use:

$ mount | grep tmpfs
tmpsfs on /dev/shm type tmpfs (rw,nosuid,nodev)
...
$ mkdir /dev/shm/tmp

You can expand its size, but be careful no to ask too much.

$ mount -o remount,size=1G /dev/shm

See this post for more info

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .