Quick way to create a symlink?Can I create Windows-style alias in Finder?Is there any way to create a hard link in the finder?Is there a way to force Finder to attempt to move something from a read-only folder?How to create an alias with drag and drop?How can I create a modifier shortcut to drag files into a new folder?Symlink to app causes NSInternalInconsistencyExceptionStop Finder from creating aliases when moving Applications

How to measure torque accurately?

Can I perform Umrah while on a Saudi Arabian visit e-visa

Translation Golf XLVIII — We're sorry to see you go

If LPG gas burners can reach temperatures above 1700 °C, then how do HCA and PAH not develop in extreme amounts during cooking?

Transiting through Switzerland by coach with lots of cash

What determines the top speed in ice skating?

How can I remove rest of file from string for all files?

Relation between signal processing and control systems engineering?

Can I color text by using an image, so that the color isn't flat?

Test if two food are the same

What is /dev/null and why can't I use hx on it?

A sentient carnivorous species trying to preserve life. How could they find a new food source?

Iron-age tools, is there a way to extract heavy metals out of a creature?

Why is there no logical not operator (!!) in C-style languages?

Is there a magnetic attraction between two parallel electron beams?

What if you can't publish in very high impact journal or top conference during your PhD?

Is it appropriate to send out a manuscript under review to a professor?

quadratic equations on 2 by 2 matrices

How to discipline overeager engineer

Should I withdraw my paper because the Editor is behaving so badly with me?

Ways to bypass spell resistance in 5e?

Son of the Revenge of the Riley Riddles in Reverse Strikes Again

に vs. を in "to pass a test"

Can something have more sugar per 100g than the percentage of sugar that's in it?



Quick way to create a symlink?


Can I create Windows-style alias in Finder?Is there any way to create a hard link in the finder?Is there a way to force Finder to attempt to move something from a read-only folder?How to create an alias with drag and drop?How can I create a modifier shortcut to drag files into a new folder?Symlink to app causes NSInternalInconsistencyExceptionStop Finder from creating aliases when moving Applications






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









3















Dragging a folder in Finder while pressing Command + Option ( + ) creates an alias. But is there a quick and similar way to create a symlink this way?










share|improve this question





















  • 5





    Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.

    – CJK
    Apr 17 at 14:38











  • XtraFinder adds this feature, among other things. It's $5, but has an unlimited (in time and in features) trial. Strongly recommend.

    – Alexander
    Apr 17 at 22:29











  • With XtraFinder, Make Symbolic Link is a menu command not a drag and drop. Also XtraFinder requires System Integrity Protection be disabled to install and does not work with macOS 10.12 with SIP enabled nor is it guaranteed to work with OS X 10.11 and macOS 10.13 with SIP enabled. IMO Frankly not worth the hassle!

    – user3439894
    Apr 18 at 11:39

















3















Dragging a folder in Finder while pressing Command + Option ( + ) creates an alias. But is there a quick and similar way to create a symlink this way?










share|improve this question





















  • 5





    Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.

    – CJK
    Apr 17 at 14:38











  • XtraFinder adds this feature, among other things. It's $5, but has an unlimited (in time and in features) trial. Strongly recommend.

    – Alexander
    Apr 17 at 22:29











  • With XtraFinder, Make Symbolic Link is a menu command not a drag and drop. Also XtraFinder requires System Integrity Protection be disabled to install and does not work with macOS 10.12 with SIP enabled nor is it guaranteed to work with OS X 10.11 and macOS 10.13 with SIP enabled. IMO Frankly not worth the hassle!

    – user3439894
    Apr 18 at 11:39













3












3








3


0






Dragging a folder in Finder while pressing Command + Option ( + ) creates an alias. But is there a quick and similar way to create a symlink this way?










share|improve this question
















Dragging a folder in Finder while pressing Command + Option ( + ) creates an alias. But is there a quick and similar way to create a symlink this way?







macos finder






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 18 at 8:57







TD540

















asked Apr 17 at 12:02









TD540TD540

1185 bronze badges




1185 bronze badges










  • 5





    Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.

    – CJK
    Apr 17 at 14:38











  • XtraFinder adds this feature, among other things. It's $5, but has an unlimited (in time and in features) trial. Strongly recommend.

    – Alexander
    Apr 17 at 22:29











  • With XtraFinder, Make Symbolic Link is a menu command not a drag and drop. Also XtraFinder requires System Integrity Protection be disabled to install and does not work with macOS 10.12 with SIP enabled nor is it guaranteed to work with OS X 10.11 and macOS 10.13 with SIP enabled. IMO Frankly not worth the hassle!

    – user3439894
    Apr 18 at 11:39












  • 5





    Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.

    – CJK
    Apr 17 at 14:38











  • XtraFinder adds this feature, among other things. It's $5, but has an unlimited (in time and in features) trial. Strongly recommend.

    – Alexander
    Apr 17 at 22:29











  • With XtraFinder, Make Symbolic Link is a menu command not a drag and drop. Also XtraFinder requires System Integrity Protection be disabled to install and does not work with macOS 10.12 with SIP enabled nor is it guaranteed to work with OS X 10.11 and macOS 10.13 with SIP enabled. IMO Frankly not worth the hassle!

    – user3439894
    Apr 18 at 11:39







5




5





Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.

– CJK
Apr 17 at 14:38





Frustrating, isn’t it? I would prefer a symlink to an alias about 80% of the time. I like the solution from @user3439894, and in combination with a launcher (lots of good, open source ones available), or simply Automator, you can streamline the process very aptly.

– CJK
Apr 17 at 14:38













XtraFinder adds this feature, among other things. It's $5, but has an unlimited (in time and in features) trial. Strongly recommend.

– Alexander
Apr 17 at 22:29





XtraFinder adds this feature, among other things. It's $5, but has an unlimited (in time and in features) trial. Strongly recommend.

– Alexander
Apr 17 at 22:29













With XtraFinder, Make Symbolic Link is a menu command not a drag and drop. Also XtraFinder requires System Integrity Protection be disabled to install and does not work with macOS 10.12 with SIP enabled nor is it guaranteed to work with OS X 10.11 and macOS 10.13 with SIP enabled. IMO Frankly not worth the hassle!

– user3439894
Apr 18 at 11:39





With XtraFinder, Make Symbolic Link is a menu command not a drag and drop. Also XtraFinder requires System Integrity Protection be disabled to install and does not work with macOS 10.12 with SIP enabled nor is it guaranteed to work with OS X 10.11 and macOS 10.13 with SIP enabled. IMO Frankly not worth the hassle!

– user3439894
Apr 18 at 11:39










2 Answers
2






active

oldest

votes


















6
















macOS does not have a native drag and drop method to create a symlink in the same manner as creating an alias in Finder. By default, symlinks are created by using ln from the command line in Terminal.




In Terminal:



$ ln
usage: ln [-Ffhinsv] source_file [target_file]
ln [-Ffhinsv] source_file ... target_dir
link source_file target_file
$


For additional details, use: man ln




For a homegrown solution using Automator and AppleScript, the following is a bare-bones example of an Automator Service (QuickAction in macOS Mojave) that when assigned a keyboard shortcut, e.g. ⌘S in System Preferences > Keyboard > Shortcuts > Services, will create a symlink of the selected items in Finder at the selected destination folder that is brought up by pressing e.g. ⌘S:



This Service (QuickAction) will be available on the Services menu in Finder or from right-click Context menu, and or the assigned keyboard shortcut once an item or items are selected in Finder.



Bare-bones example AppleScript code:



on run input, parameters

if input is equal to then return

activate

set posixPath to POSIX path of (choose folder with prompt ¬
"Select destination folder for Symlink..." default location ¬
(path to desktop folder) with invisibles)

repeat with thisItem in input
set thisItem to POSIX path of (thisItem as alias)
try
do shell script "ln -s " & quoted form of thisItem & ¬
space & quoted form of posixPath
end try
end repeat

end run


The example AppleScript code assumes you have write privileges at the selected destination folder, other then the selected items source folder, and as coded only creates the symlink if it doesn't already exist. Changes can be made to the code to accommodate other options.



Make Symbolic Link Automator Service




Note: The example AppleScript code is just that and, other then a single try statement, does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.






share|improve this answer



























  • Excellent. Do you think there's perhaps a way to overwrite Finder's native drag and drop behaviour?

    – TD540
    Apr 18 at 9:09






  • 1





    @thomasdecrick, Sorry, no, I do not know of a way to override the default behavior. That said, since one has to press ⌘⌥ and use the mouse anyway, setting up a keyboard shortcut e.g. ⌘S for the Automator Service and some mouse clicks is not a bad alternative. Also, keep in mind that if you already have the destination folder open in another Finder window, you can always drag an drop the folder into the choose folder window to quickly change it to that location and not necessarily have to manually navigate to it.

    – user3439894
    Apr 18 at 13:57


















5
















The service SymbolicLinker will do what you need.






share|improve this answer

































    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    6
















    macOS does not have a native drag and drop method to create a symlink in the same manner as creating an alias in Finder. By default, symlinks are created by using ln from the command line in Terminal.




    In Terminal:



    $ ln
    usage: ln [-Ffhinsv] source_file [target_file]
    ln [-Ffhinsv] source_file ... target_dir
    link source_file target_file
    $


    For additional details, use: man ln




    For a homegrown solution using Automator and AppleScript, the following is a bare-bones example of an Automator Service (QuickAction in macOS Mojave) that when assigned a keyboard shortcut, e.g. ⌘S in System Preferences > Keyboard > Shortcuts > Services, will create a symlink of the selected items in Finder at the selected destination folder that is brought up by pressing e.g. ⌘S:



    This Service (QuickAction) will be available on the Services menu in Finder or from right-click Context menu, and or the assigned keyboard shortcut once an item or items are selected in Finder.



    Bare-bones example AppleScript code:



    on run input, parameters

    if input is equal to then return

    activate

    set posixPath to POSIX path of (choose folder with prompt ¬
    "Select destination folder for Symlink..." default location ¬
    (path to desktop folder) with invisibles)

    repeat with thisItem in input
    set thisItem to POSIX path of (thisItem as alias)
    try
    do shell script "ln -s " & quoted form of thisItem & ¬
    space & quoted form of posixPath
    end try
    end repeat

    end run


    The example AppleScript code assumes you have write privileges at the selected destination folder, other then the selected items source folder, and as coded only creates the symlink if it doesn't already exist. Changes can be made to the code to accommodate other options.



    Make Symbolic Link Automator Service




    Note: The example AppleScript code is just that and, other then a single try statement, does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.






    share|improve this answer



























    • Excellent. Do you think there's perhaps a way to overwrite Finder's native drag and drop behaviour?

      – TD540
      Apr 18 at 9:09






    • 1





      @thomasdecrick, Sorry, no, I do not know of a way to override the default behavior. That said, since one has to press ⌘⌥ and use the mouse anyway, setting up a keyboard shortcut e.g. ⌘S for the Automator Service and some mouse clicks is not a bad alternative. Also, keep in mind that if you already have the destination folder open in another Finder window, you can always drag an drop the folder into the choose folder window to quickly change it to that location and not necessarily have to manually navigate to it.

      – user3439894
      Apr 18 at 13:57















    6
















    macOS does not have a native drag and drop method to create a symlink in the same manner as creating an alias in Finder. By default, symlinks are created by using ln from the command line in Terminal.




    In Terminal:



    $ ln
    usage: ln [-Ffhinsv] source_file [target_file]
    ln [-Ffhinsv] source_file ... target_dir
    link source_file target_file
    $


    For additional details, use: man ln




    For a homegrown solution using Automator and AppleScript, the following is a bare-bones example of an Automator Service (QuickAction in macOS Mojave) that when assigned a keyboard shortcut, e.g. ⌘S in System Preferences > Keyboard > Shortcuts > Services, will create a symlink of the selected items in Finder at the selected destination folder that is brought up by pressing e.g. ⌘S:



    This Service (QuickAction) will be available on the Services menu in Finder or from right-click Context menu, and or the assigned keyboard shortcut once an item or items are selected in Finder.



    Bare-bones example AppleScript code:



    on run input, parameters

    if input is equal to then return

    activate

    set posixPath to POSIX path of (choose folder with prompt ¬
    "Select destination folder for Symlink..." default location ¬
    (path to desktop folder) with invisibles)

    repeat with thisItem in input
    set thisItem to POSIX path of (thisItem as alias)
    try
    do shell script "ln -s " & quoted form of thisItem & ¬
    space & quoted form of posixPath
    end try
    end repeat

    end run


    The example AppleScript code assumes you have write privileges at the selected destination folder, other then the selected items source folder, and as coded only creates the symlink if it doesn't already exist. Changes can be made to the code to accommodate other options.



    Make Symbolic Link Automator Service




    Note: The example AppleScript code is just that and, other then a single try statement, does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.






    share|improve this answer



























    • Excellent. Do you think there's perhaps a way to overwrite Finder's native drag and drop behaviour?

      – TD540
      Apr 18 at 9:09






    • 1





      @thomasdecrick, Sorry, no, I do not know of a way to override the default behavior. That said, since one has to press ⌘⌥ and use the mouse anyway, setting up a keyboard shortcut e.g. ⌘S for the Automator Service and some mouse clicks is not a bad alternative. Also, keep in mind that if you already have the destination folder open in another Finder window, you can always drag an drop the folder into the choose folder window to quickly change it to that location and not necessarily have to manually navigate to it.

      – user3439894
      Apr 18 at 13:57













    6














    6










    6









    macOS does not have a native drag and drop method to create a symlink in the same manner as creating an alias in Finder. By default, symlinks are created by using ln from the command line in Terminal.




    In Terminal:



    $ ln
    usage: ln [-Ffhinsv] source_file [target_file]
    ln [-Ffhinsv] source_file ... target_dir
    link source_file target_file
    $


    For additional details, use: man ln




    For a homegrown solution using Automator and AppleScript, the following is a bare-bones example of an Automator Service (QuickAction in macOS Mojave) that when assigned a keyboard shortcut, e.g. ⌘S in System Preferences > Keyboard > Shortcuts > Services, will create a symlink of the selected items in Finder at the selected destination folder that is brought up by pressing e.g. ⌘S:



    This Service (QuickAction) will be available on the Services menu in Finder or from right-click Context menu, and or the assigned keyboard shortcut once an item or items are selected in Finder.



    Bare-bones example AppleScript code:



    on run input, parameters

    if input is equal to then return

    activate

    set posixPath to POSIX path of (choose folder with prompt ¬
    "Select destination folder for Symlink..." default location ¬
    (path to desktop folder) with invisibles)

    repeat with thisItem in input
    set thisItem to POSIX path of (thisItem as alias)
    try
    do shell script "ln -s " & quoted form of thisItem & ¬
    space & quoted form of posixPath
    end try
    end repeat

    end run


    The example AppleScript code assumes you have write privileges at the selected destination folder, other then the selected items source folder, and as coded only creates the symlink if it doesn't already exist. Changes can be made to the code to accommodate other options.



    Make Symbolic Link Automator Service




    Note: The example AppleScript code is just that and, other then a single try statement, does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.






    share|improve this answer















    macOS does not have a native drag and drop method to create a symlink in the same manner as creating an alias in Finder. By default, symlinks are created by using ln from the command line in Terminal.




    In Terminal:



    $ ln
    usage: ln [-Ffhinsv] source_file [target_file]
    ln [-Ffhinsv] source_file ... target_dir
    link source_file target_file
    $


    For additional details, use: man ln




    For a homegrown solution using Automator and AppleScript, the following is a bare-bones example of an Automator Service (QuickAction in macOS Mojave) that when assigned a keyboard shortcut, e.g. ⌘S in System Preferences > Keyboard > Shortcuts > Services, will create a symlink of the selected items in Finder at the selected destination folder that is brought up by pressing e.g. ⌘S:



    This Service (QuickAction) will be available on the Services menu in Finder or from right-click Context menu, and or the assigned keyboard shortcut once an item or items are selected in Finder.



    Bare-bones example AppleScript code:



    on run input, parameters

    if input is equal to then return

    activate

    set posixPath to POSIX path of (choose folder with prompt ¬
    "Select destination folder for Symlink..." default location ¬
    (path to desktop folder) with invisibles)

    repeat with thisItem in input
    set thisItem to POSIX path of (thisItem as alias)
    try
    do shell script "ln -s " & quoted form of thisItem & ¬
    space & quoted form of posixPath
    end try
    end repeat

    end run


    The example AppleScript code assumes you have write privileges at the selected destination folder, other then the selected items source folder, and as coded only creates the symlink if it doesn't already exist. Changes can be made to the code to accommodate other options.



    Make Symbolic Link Automator Service




    Note: The example AppleScript code is just that and, other then a single try statement, does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 17 at 16:47

























    answered Apr 17 at 12:47









    user3439894user3439894

    32.2k7 gold badges49 silver badges71 bronze badges




    32.2k7 gold badges49 silver badges71 bronze badges















    • Excellent. Do you think there's perhaps a way to overwrite Finder's native drag and drop behaviour?

      – TD540
      Apr 18 at 9:09






    • 1





      @thomasdecrick, Sorry, no, I do not know of a way to override the default behavior. That said, since one has to press ⌘⌥ and use the mouse anyway, setting up a keyboard shortcut e.g. ⌘S for the Automator Service and some mouse clicks is not a bad alternative. Also, keep in mind that if you already have the destination folder open in another Finder window, you can always drag an drop the folder into the choose folder window to quickly change it to that location and not necessarily have to manually navigate to it.

      – user3439894
      Apr 18 at 13:57

















    • Excellent. Do you think there's perhaps a way to overwrite Finder's native drag and drop behaviour?

      – TD540
      Apr 18 at 9:09






    • 1





      @thomasdecrick, Sorry, no, I do not know of a way to override the default behavior. That said, since one has to press ⌘⌥ and use the mouse anyway, setting up a keyboard shortcut e.g. ⌘S for the Automator Service and some mouse clicks is not a bad alternative. Also, keep in mind that if you already have the destination folder open in another Finder window, you can always drag an drop the folder into the choose folder window to quickly change it to that location and not necessarily have to manually navigate to it.

      – user3439894
      Apr 18 at 13:57
















    Excellent. Do you think there's perhaps a way to overwrite Finder's native drag and drop behaviour?

    – TD540
    Apr 18 at 9:09





    Excellent. Do you think there's perhaps a way to overwrite Finder's native drag and drop behaviour?

    – TD540
    Apr 18 at 9:09




    1




    1





    @thomasdecrick, Sorry, no, I do not know of a way to override the default behavior. That said, since one has to press ⌘⌥ and use the mouse anyway, setting up a keyboard shortcut e.g. ⌘S for the Automator Service and some mouse clicks is not a bad alternative. Also, keep in mind that if you already have the destination folder open in another Finder window, you can always drag an drop the folder into the choose folder window to quickly change it to that location and not necessarily have to manually navigate to it.

    – user3439894
    Apr 18 at 13:57





    @thomasdecrick, Sorry, no, I do not know of a way to override the default behavior. That said, since one has to press ⌘⌥ and use the mouse anyway, setting up a keyboard shortcut e.g. ⌘S for the Automator Service and some mouse clicks is not a bad alternative. Also, keep in mind that if you already have the destination folder open in another Finder window, you can always drag an drop the folder into the choose folder window to quickly change it to that location and not necessarily have to manually navigate to it.

    – user3439894
    Apr 18 at 13:57













    5
















    The service SymbolicLinker will do what you need.






    share|improve this answer





























      5
















      The service SymbolicLinker will do what you need.






      share|improve this answer



























        5














        5










        5









        The service SymbolicLinker will do what you need.






        share|improve this answer













        The service SymbolicLinker will do what you need.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 17 at 12:54









        Jeffrey J WeimerJeffrey J Weimer

        1615 bronze badges




        1615 bronze badges
















            Popular posts from this blog

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?