I have millions of images on my ubuntu cloud server. When I move a complete folder containing 12 million images using mv
command, it happens almost instantaneously. However, when I mv
only images(not the folder) then it takes some time. Is there a way to move all the images as quickly as folders ?
This is what is happening:
src folder has 12 million images and I move this to dst folder using
$ mv src ../dst
Happens immediately
Inside src folder I do this to move:
find -maxdepth 1 -name '*.jpg' -exec mv -t ../../dst/ {} +
This takes some time.
Is there a way to speed up the second process ?