Ubuntu, delete all files that start with ‘._’

rmUbuntu

I want to delete all files that start with ._, when I run this command:

me@me:/var/www/my/project$ sudo rm -Rvi ._*
rm: cannot remove `._*': No such file or directory

I'm pretty sure the . is causing problems, making it think I mean the current directory, what's the correct syntax to achieve this?

I know these files originated from my Mac, I need a way of nuking them 🙂

Many thanks

Ben

Best Answer

You can try this:

find -name ._\* |xargs sudo rm -Rvi

or if your shell doesn't like that:

find |grep -e '^\._' | xargs sudo rm -Rvi

find without any arguments should just list everything.

Related Question