compiler
V2EX  ›  问与答

Mac 上,假设 Chrome.app 位于 A 目录,为什么不能使用 ln -s /A/Chrome.app /Applications/建立的符号链接打开 Chrome 呢?

  •  
  •   compiler · Aug 16, 2019 · 2848 views
    This topic created in 2473 days ago, the information mentioned may be changed or developed.
    7 replies    2019-08-22 13:05:16 +08:00
    yksoft1test
        1
    yksoft1test  
       Aug 16, 2019
    因为 Chrome.app 是目录而不是可执行文件啊。在 Shell 下你也无法直接执行它。
    lovestudykid
        2
    lovestudykid  
       Aug 16, 2019
    /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
    compiler
        3
    compiler  
    OP
       Aug 16, 2019
    @yksoft1test 但在 finder 中,他可以双击直接打开的,想求助下如何实现符号链接呢
    nevin47
        4
    nevin47  
       Aug 16, 2019 via Android
    @compiler 2 楼已经给了方案了
    finder 双击能执行,只是因为是 finder 而已,你也可以写个 derfin,右键就能执行😂😂
    CommandZi
        5
    CommandZi  
       Aug 17, 2019
    open 命令打开
    jamesliu96
        6
    jamesliu96  
       Aug 17, 2019 via Android
    可以链个 shell 脚本里面写上 open Chrome.app
    compiler
        7
    compiler  
    OP
       Aug 22, 2019 via iPhone
    @jamesliu96 #6 这个方法很棒~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3736 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 466ea39e · 42ms · UTC 05:03 · PVG 13:03 · LAX 22:03 · JFK 01:03
    ♥ Do have faith in what you're doing.