Benches macOS

2

How to create an alias from the command l…

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Hi

I would like to know how to create an alias (for a file, not a command) from the command line. I don't want to use the ln command, as an alias has more interesting features than soft/hard links... Is there an Apple specific tool to do this?

Thanks

-Jerome

Mac OS X (10.4.10)

2 replies

Sign in or join Beachball Help to reply.

  1. 0

    biovizier

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    The only straightforward way that I am aware of for creating a "Finder" alias from the command line is using AppleScript via '
    osascript'. Of course, it's not really a command line solution since the "Finder" has to be running. Anyway, something along the lines of:

    <pre style="overflow:auto; padding: 5px; width: 500px ; font-size: 10px; border:1">osascript -e 'tell application "Finder" to make alias file to POSIX file "/full/path/to/file" at POSIX file "/full/path/to/folder"'</pre>

  2. 0

    jeromedroz

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thank you, it works perfectly...

    -Jerome