I am trying to find and copy all the images from one location to another preserving the folder structure. I have tried using the following command:
sudo find . -type f -exec file {} \; | awk -F: '{ if ($2 ~/[Ii]mage|EPS/) print $1}' | cpio -pdm /media/newlocation
This works fine for couple of minutes (I have gigabytes of files to be found and copies) but after some time I am getting the following error:
find: `file' terminated by signal 13
What is wrong with the command? Is there better way of doing it?
Regards