我是从的印象是这里在其他研究中,rsync的是用于同步的目录和他们有任何内容的命令。
我尝试了以下命令:
rsync -avzr ~/testing123 ~/Desktop/apartment
sudo rsync -avzr ~/testing123 ~/Desktop/apartment
Run Code Online (Sandbox Code Playgroud)
它们都不保留图标,它们都产生相同的结果:
sent 544 bytes received 92 bytes 1272.00 bytes/sec
total size is 6148 speedup is 9.67
building file list ... done
created directory /Users/null/Desktop/apartment
testing123/
testing123/.DS_Store
testing123/Icon\#015
testing123/info.txt
sent 566 bytes received 92 bytes 1316.00 bytes/sec
total size is 6166 speedup is 9.37
Run Code Online (Sandbox Code Playgroud)
它们都正确同步文件,但不保留原始文件或目录中的图标。对于目录,这两个命令都不会在文件夹上保留图标,而是在名为“Icon”的目标目录中创建一个没有扩展名的“0 KB”文件。对于文件,它什么都不做,没有神秘的“图标”文件,也没有实际的图标。
是我使用了错误的论点吗?这里有什么问题?为什么rsync实际上不会在目标文件上创建与源文件上相同的图标?
您需要将-E选项指定为rsync.
-E, --extended-attributes
Apple specific option to copy extended attributes, resource
forks, and ACLs. Requires at least Mac OS X 10.4 or suitably
patched rsync.
Run Code Online (Sandbox Code Playgroud)
图标存储在 HFS+ 资源分支中。
| 归档时间: |
|
| 查看次数: |
1912 次 |
| 最近记录: |