I have a mess in my photo libary. I have files like these:
image-1.jpg
image-1.jpeg
image-2.jpg
Now I want to delete all photos with the extension .jpeg when there is a file with the same name but with the extension .jpg.
How can I do this?
bashfilenamesrm
I have a mess in my photo libary. I have files like these:
image-1.jpg
image-1.jpeg
image-2.jpg
Now I want to delete all photos with the extension .jpeg when there is a file with the same name but with the extension .jpg.
How can I do this?
Best Answer
(remove
echo
if happy).With
zsh
and onerm
invocation:(change
*
to**/*
to do that recursively, add theD
glob qualifier, if you also want to consider hidden files or files in hidden directories).