dogking2
V2EX  ›  问与答

如何找到某个环境变量的具体配置位置呢

  •  
  •   dogking2 · Jul 13, 2022 · 1400 views
    This topic created in 1404 days ago, the information mentioned may be changed or developed.

    比如这个 vmware ,我已经删除了应用,但是 PATH 中还是存在

    $ echo $PATH
    /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion Tech Preview.app/Contents/Public:/usr/local/go/bin
    
    4 replies    2022-07-14 17:31:12 +08:00
    TimePPT
        1
    TimePPT  
    PRO
       Jul 13, 2022
    /etc/profile
    /etc/paths
    ~/.bash_profile
    ~/.bash_login
    ~/.profile
    ~/.bashrc
    类似的,全部查一遍。
    dogking2
        2
    dogking2  
    OP
       Jul 13, 2022
    @TimePPT find 全局搜索找到了,在这个`/private/etc/paths.d/`路径下
    julyclyde
        3
    julyclyde  
       Jul 14, 2022
    @dogking2 find 只能找文件名啊,不能找内容的
    dogking2
        4
    dogking2  
    OP
       Jul 14, 2022
    @julyclyde 配合 xargs 搜内容
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2986 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 00:24 · PVG 08:24 · LAX 17:24 · JFK 20:24
    ♥ Do have faith in what you're doing.