O GNU find tem uma opção -delete
. Se você tiver o GNU localizado, isso deve funcionar (e deve estar imune a qualquer problema com espaços em branco e outros caracteres engraçados em nomes de arquivos):
find . -name '._*' -delete
Da documentação ( info find
):
-- Action: -delete
Delete files or directories; true if removal succeeded. If the
removal failed, an error message is issued.
The use of the '-delete' action on the command line automatically
turns on the '-depth' option (*note find Expressions::). This can
be surprising if you were previously just testing with '-print',
so it is usually best to remember to use '-depth' explicitly.
If '-delete' fails, 'find''s exit status will be nonzero (when it
eventually exits).