This is the code I used.
find . -regex '.*\(jpg\|jpeg\|png\|gif\)' \! -path './ToutesImages/*' -exec echo cp -t ToutesImages {}
Because it shows me all images in the system and echoes my code i guess something with the -exec echo cp -t ToutesImages {}
is wrong. Does anyone know how I can improve this?
CodePudding user response:
The echo
is there as a dry run so you can preview the command that will be executed. If it looks like the right set of files then delete it to actually perform the copy.