当从mac复制文件到其他系统的时候,你会发现,目录下面多了一堆._开头的同名文件,很让人纠结,找了资料,说这是【 “Apple Double” 的文件系統處理機制】,虽然可以被删除,但很麻烦。
找到的原文是这么说的:
XML/HTML代码
- Before Mac OS X, the Mac OS used ‘forked’ files, which have two components: a data fork and a resource fork. The Mac OS Standard (HFS) and Mac OS Extended (HFS Plus) disk formats support forked files. When you move these types of files to other disk formats, the resource fork can be lost.
- With Mac OS X, there is a mechanism called “Apple Double” that allows the system to work with disk formats that do not have a forked file feature, such as remote NFS, SMB, WebDAV directories, or local UFS volumes. Apple Double does this by converting the file into two separate files. The first new file keeps the original name and contains the data fork of the original file. The second new file has the name of the original file prefixed by a “._ ” and contains the resource fork of the original file. If you see both files, the ._ file can be safely ignored. Sometimes when deleting a file, the ._ component will not be deleted. If this occurs you can safely delete the ._ file.
好吧,我当然是没辙的,所以就只能用fin . -name "._*"|xargs rm这样的方式来删除了。这也是参考文章中的办法: OSX 下 DOT_ 前綴文件
不过还是有一点小问题,那就是如果文件夹中有空格,其实在查询的时候是会被加上“\”的,也就导致在删除 的时候这个反斜杠变成了转义符。所以,这个目录还是先mv一下,改个名吧