手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆

MAC复制文件后所增加的._开头的文件

首页 > 苹果相关 >

当从mac复制文件到其他系统的时候,你会发现,目录下面多了一堆._开头的同名文件,很让人纠结,找了资料,说这是【 “Apple Double” 的文件系統處理機制】,虽然可以被删除,但很麻烦。

找到的原文是这么说的:

XML/HTML代码
  1. 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.  
  2.   
  3. 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这样的方式来删除了。这也是参考文章中的办法:

不过还是有一点小问题,那就是如果文件夹中有空格,其实在查询的时候是会被加上“\”的,也就导致在删除 的时候这个反斜杠变成了转义符。所以,这个目录还是先mv一下,改个名吧




本站采用创作共享版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"易栈网-膘叔", 保留原始链接, 此外还必须标注原文标题和链接.

Tags: mac, copy

« 上一篇 | 下一篇 »

只显示10条记录相关文章

超详细:在Mac OS X中配置Apache + PHP + MySQL (浏览: 40395, 评论: 1)
mac os x上禁用虚拟内存 (浏览: 26874, 评论: 0)
苹果电脑MAC OS X安装和删除程序的方法 (浏览: 25383, 评论: 0)
支付宝已支持 Linux 下的 Firefox (浏览: 24628, 评论: 0)
浅复制与深复制中的传值与传址 (浏览: 22650, 评论: 0)
mac下面安装php5.4 (浏览: 21670, 评论: 0)
Time machine For Ubuntu (浏览: 20329, 评论: 0)
安装St2的Dash插件 (浏览: 19863, 评论: 0)
【科普贴】话说回车和换行 (浏览: 19090, 评论: 0)
mac上怎么安装gcc? (浏览: 19028, 评论: 0)

1条记录访客评论

用doc_clean命令

Post by CC-Dog on 2013, July 11, 4:30 PM 引用此文发表评论 #1


发表评论

评论内容 (必填):