Linux command to find and delete certain files, but output the result or verbose mode

bashlinuxscripting

So I use these command on my storage server to clean up some junk, but it doesn't produce any output or result. I found the syntax online somewhere and just modified for which files I need it. What else do I need to add to see what is actually being deleted or total at the end? Ultimately this would be a script that will run automatically but for right now I'm running the commands manually. Thanks in advance!

find . -name .DS_Store -printf \"%p\"\ \  | xargs rm 
find . -name ._.DS_Store -printf \"%p\"\ \  | xargs rm 
find . -name Thumbs.db -printf \"%p\"\ \  | xargs rm
find . -name ._Thumbs.db -printf \"%p\"\ \  | xargs rm

Best Answer

find also has a -delete flag. And you could also combine everything into one command, possibly saving some time:

find . \( -name .DS_Store -or -name ._.DS_Store -or -name Thumbs.db -or -name ._Thumbs.db \) -print -delete