Answer the question
In order to leave comments, you need to log in
How to make find faster?
It is required to find all json files in the directories and pack them into an archive. There are about 100 thousand of them.
Now it all works through the command:
find /var/lib/pterodactyl/volumes/ -regex '.*\(.json\)' -size -200000k -exec tar -rvf /back.tar {} \;
Answer the question
In order to leave comments, you need to log in
I would break the task into two stages - first you collect find
all the paths to the files, then you set the archiver on the resulting list. And why -regex, which probably gives an overhead, if you can just search by mask?
instead exec
use xargs
- profit every
200 times. Will acceleration suit you 200 times?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question