I'm writing a shell script which will rsync files from remote machines, some linux, some macs, to a central backup server. The macs have folders on the root level containing aliases of all files/folders which need to be backed up. What is a terminal command I can use to resolve the path to the files/folders the aliases point to? (I'll need to pass these paths to rsync)
相关问题
- How to get the return code of a shell script in lu
- Highlight parent path to the root
- Invoking Mirth Connect CLI with Powershell script
- Xcode debugger displays incorrect values for varia
- Is there a way to report errors in Apple documenta
相关文章
- 使用2台跳板机的情况下如何使用scp传文件
- 现在使用swift开发ios应用好还是swift?
- Visual Studio Code, MAC OS X, OmniSharp server is
- In IntelliJ IDEA, how can I create a key binding t
- shell中反引号 `` 赋值变量问题
- How get the time in milliseconds in FreeBSD?
- xcode 4 garbage collection removed?
- IntelliJ IDEA can't open projects or add SDK o
I had this problem and so I've implemented a command-line tool. It's open source at https://github.com/rptb1/aliasPath
The key thing is that it will work even if the alias is broken, unlike any AppleScript solution I've found. You can therefore use it to write scripts to fix aliases when lots of files change volume. That's why I wrote it.
The source code is very short, but here's a summary of the key part, for anyone else needing to solve this problem in code, or who wants to look up the relevant protocols.
I've found this tool.
A tiny bit of compiled code, a function in your
.bash_profile
, and voila. Transparent handling of aliases, just use "cd". Several times faster than using Applescript, too.I found the following script which does what I needed: