How can I use the terminal / Linux commands to recursively search a drive for images (jpg) and copy them to my desktop, renaming all the found files using numbers. So the first time it finds should be copied to the desktop as 1.jpg, the second file should be copied as 2.jpg and 50,000th file should be copied as 50000.jpg and so on.
There are two problems here.
For the first problem the obvious and correct solution is
Of course this could be made more sophisticated if you wanted to e.g. do type detection with
The second problem is sequential copying. A simple counter is all that is necessary to make this work.
Doing this inside a loop, of course, where
Putting it all together