The man page of rm says:
-r, -R, --recursive
remove directories and their contents recursively
This means the flag -r
is expecting a directory.
But *.xml
is not a directory.
If you want to remove the all .xml files from current directory recursively below is the command:
find . -name "*.xml" -type f|xargs rm -f