Mic*_*der 40 mac finder symbolic-link macos
有没有办法ln -s在 Mac OS X Finder (OS 10.5) 中获得与 unix 命令相同的功能?我希望能够在不打开终端的情况下在 Finder 窗口中工作时创建符号链接。
请注意,Make AliasFinder中的命令不是我想要的,因为这些别名无法在终端中导航(但使用创建的链接ln -s可以由终端和 Finder 导航)。
nuc*_*nuc 16
通过 AppleScript 在 Finder中创建符号链接怎么样 ?
这是该链接中最相关的脚本:
on run
open {choose file with prompt "Choose a file to create a symbolic link:" without invisibles}
end run
on open the_files
repeat with i from 1 to (count the_files)
try
set posix_path to POSIX path of (item i of the_files)
if posix_path ends with "/" then set posix_path to text 1 thru -2 of posix_path
do shell script "ln -s " & quoted form of posix_path & " " & quoted form of (posix_path & ".sym")
end try
end repeat
end open
Run Code Online (Sandbox Code Playgroud)
只需将其粘贴到AppleScript 编辑器中并将其另存为应用程序即可。然后,您可以将其拖到查找器的工具栏上或将其链接到Dock 上。