How do I remove all files starting with ._ from the shell in Linux?

As a title really. I copied some files to the Raspberry Pi from the Mac. This resulted in a large number of extra files appearing, starting with the prefix ._

. I want to delete every file in the folder starting with ._

. How should I do it?

+3


source to share


1 answer


Try something like:

cd /path/to/directory; \rm -rf ._*

      



OR if there are recursive files in subfolders, try:

find /path/to/directory -name "._*" -type f -print0| xargs -0 \rm -rf

      

+5


source







All Articles