osx - OS X terminal command to resolve path of an alias -


I am writing a shell script that files files from a remote machine, some Linux, some Mac, a central backup server. There are folders at the root level of the macs in which all the files / folders have the nicknames that need to be backed up. What is a terminal command that I can use to solve the path of files / folders, which point to Elias? (I have to pass these paths to rsync)

I had this problem and so I asked for a command line Applied Applied This is open source

The important thing is that this nickname is also broken, even if I found that any AppleScript solution would work in contrast to. So you can use it to write slips so that aliases will be fine when many files change the volume, this is the reason I have written it.

The source code is very small, but it is a summary of the key part, someone else needs to solve this problem in the code, or wants to see the relevant protocol.

NSString * aliasPath = [NSString string withUTF8String: posixPathToAlias]; NSURL * aliasURL = [NSURL file URL together text: nickname}; NSError * error; NSData * bookmarkData = [NSUUR bookmarkData with content of URL: aliasURL error: & amp; Error]; NSDictionary * value = [NSURL for the values ​​of resources: bookmarkmarked data from: [NSURLPathKey] Data: BookmarkData]; NSString * path = [value objectForreq: NS URL path]; Const char * s = [path UTF8String];

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -