compiler
V2EX  ›  问与答

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

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