Delete Mac System Files with Dot_clean
Posted by Gina Trapani at 9:00 AM on April 8, 2008
Mac guy Rob Griffiths points out a few brand new command line utilities in Leopard, like the handy dot_clean command, which sweeps away Mac system files that start with a dot and annoy the hell out of you when you use that thumb drive on your PC. Griffiths writes:
Prior to 10.5, you had to manually delete them on the other system, or use Terminal trickery to remove them on the Mac prior to copying. As of 10.5, though, you can just use the dot_clean command on the directory in question. TypeNow you don't have to disable .DS_Store file creation entirely; though you may still have to deal with Windows' annoying Thumbs.db system files on your Mac.dot_clean /path/folderto join the dot-underscore files with their parent files. Read OS X 10.5's manual pages (man dot_clean) for more information.

Comments (AU Comments · US Comments)
There are currently no AU comments for this post.
sidmuchrock
Posted 8:49 AM 8/4/08
Umm why do these annoy folks? Everyone got ls aliased to ls -a or something?
sidmuchrock
Deprong Mori
Posted 9:10 AM 8/4/08
@sidmuchrock:
Gina's post does mention at least one real world example of when these dot files make an appearance: when you plug a thumb drive into a Windows machine. I've seen them as well on some shared network folders.
While this might seem trivial, if you work in a multi-platform environment and have directories with lots of files (e.g., an image directory on a web server), yes, seeing these dot files does get annoying.
Deprong Mori
aelver
Posted 10:01 AM 8/4/08
Yeah, go ahead and remove . and .. I double dare ya!
aelver
AndyFromTucson
Posted 10:32 AM 8/4/08
I just crossed my fingers and used this to delete the ._ files from a directory on my Samba network folder and it seemed to work and nothing blew up. I used the -m switch (which the man page says will delete the ._ files instead of merging them) since I didn't like the sound of merging them.
AndyFromTucson
ottoflux
Posted 9:20 AM 8/4/08
@sidmuchrock:
better yet, plug an SD card you dropped images on from your Mac into a digital photo frame and watch it process all the 'X' images that it doesn't know how to display. again, not that big of a deal, but enough to be annoying in some circumstances.
oh, and yes, i tend to ls -al with unix-ish (cygwin, etc.) on my work pc.
ottoflux
nmstech
Posted 12:51 AM 10/4/08
If you really want to know where your free space is, I use a utility called Where's The Free Space. I got the trial version from [www.wheresthefreespace.com] . The full version is alot more flexible.
nmstech