Get rid of those ._filename created by a mac connection

Status
Not open for further replies.

thaFaxGuy

Dabbler
Joined
Jan 8, 2013
Messages
20
This is a tip to get rid of those (._filenames) created when you open a file on a SMB share on your MAC.
If you use SMB share to connect to you NAS from a MAC, each time you open a file it generates a copy of a ._openedfilename. As a result you have a lot of ._files that are not use able but adds up and take up valuable disk space.

To get rig of them create a cron job with the following command:
find / -name "._*" -exec rm -f {} \;

cleanup.PNG
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Be very careful with this as there is the potential for data loss. Specifically, those "._" files are created to hold data that would otherwise be stored as an extended attribute or resource fork. Things like file icon, "Spotlight comment", Finder copying status, type and creator codes, etc. Deleting these files can lead to being unable to open certain file types (NeoOffice and MS Office still require type and creator codes).

That said, in the majority of cases these are just going to contain replaceable metadata. Before you start deleteing them though, check that it's nothing critical to your workflow.

Also note that FreeNAS 9.1.2 will include Netatalk v3 (https://bugs.freenas.org/issues/3070) which solves a similar issue (.AppleDouble) for AFP.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'd hide the files with the "hidden" setting in CIFS instead of deleting them. There's alot of room for things to go wrong if these files are deleted. There's several threads on how to do this around the forum.
 
Status
Not open for further replies.
Top