Written by me@grafxflow
11 Nov, 2018
0
16,451
I have always had an issue when copying files from macOS to a windows formatted drive, that I would suddenly find loads of files with the same name but hidden starting with '._'.
So how can we remove all these files, well my first thought was to show all the hidden files on macOS using the terminal but guess what they still didn't show.
See how to show hidden files in macOS with terminal or quick keys.
What about opening the directory using an application which allows you to see all the hidden files like 'Atom' and delete them this way, well first if they are in subdirectories this could be time consuming plus another problem happens - macOS doesn't recognize they are in the trash so you still can't delete them!
As per usual with most of these issues it can be solved completely 100% in the terminal.
So here is how we can remove all those files starting with '._'?
The input below searches for files starting with '._' and then lists them all.
find . -type f -name "._*" -print
But the more important part is how to delete them... well that is simple enough.
find . -type f -name "._*" -delete
Plus if you want to list the files which have been deleted use this.
find . -type f -name "._*" -print -delete
I hope this solves the problem I had for ages but thank goodness I found this solution.
22 Apr, 2020
30 Dec, 2018
Darth Maul and Micro-Organisms: Inside George Lucas's Cancelled Star Wars Sequel Trilogy
How to Automatically Convert DVD Subtitles to SRT on Mac
The $4 Billion Divorce: Inside the Awkward, Painful Sale of Lucasfilm to Disney
The Rift That Broke the Whip: Inside Lucas, Spielberg, and Harrison Ford's 'Furious Rows' Over Indiana Jones
Breaking the Endless Loop: Why Star Wars Needs an Origin Story
Founder, Grafxflow
I am a Full-stack Developer who also started delving into the world of UX/UI Design a few years back. I blog and tweet to hopefully share a little bit of knowledge that can help others around the web. I build lighting-fast dynamic content engines with Laravel, Winter CMS and Tailwind CSS. Thanks for stopping by!