是否可行: ln -s ~/Documents/MyOwnDownloads ~/Downloads

2021 年 8 月 4 日
 zenwong
rm -rf ~/Downloads
ln -s ~/Documents/MyOwnDownloads ~/Downloads

是否可行?是否工作正常如原生 ~/Downloads ?

2883 次点击
所在节点    macOS
8 条回复
leon0318
2021 年 8 月 4 日
是的
FurN1
2021 年 8 月 4 日
macOS 自己用 Finder 能创建的快捷方式是 alias,和你创建的 symlink 稍有区别,参见 https://apple.stackexchange.com/a/323217/350878

按照这个链接的解释,symlink 是否可行要看你希望后面做什么事了:if you move a file, aliases are superior since they can often still point at the correct file when a change happens.
dozer47528
2021 年 8 月 4 日
可行,但不是所有 App 都 follow 了 symlink 。
我测试下来,截图不行,Mail 不行,需要重新手动指定到新的地址
Volekingsg
2021 年 8 月 4 日
可以,比如说我把 Documents 软链接到了 Dropbox 中的 Document,不过记得把这个文件锁起来,否则在较新的几个版本的 macOS 上重启后会自动删除软链接恢复成文件夹

rm -rf ~/Documents && ln -s ~/Dropbox/Documents ~
SetFileIcon -image ~/Pictures/icons/macOS_Documents.icns -file ~/Documents
sudo chflags -h uchg ~/Documents
maizero
2021 年 8 月 4 日
关注
wclebb
2021 年 8 月 4 日
这个思路可行,毕竟下载的文件有时候懒得清理但还是占用宝贵的空间。
MrCurly
2021 年 8 月 4 日
没太理解,这么做能实现什么特殊的需求么?毕竟能操作 downloads 就能操作 myowndownloads
daveh
2021 年 8 月 4 日
可行,但 Documents 在 iCloud Driver 上,意味你下载到 Download,又要上传一遍到 iCloud 。。。网速快不是问题。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://v2ex.ih06.com/t/793499

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX