V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
dogking2
V2EX  ›  问与答

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

  •  
  •   dogking2 · 2022-07-13 12:11:03 +08:00 · 697 次点击
    这是一个创建于 653 天前的主题,其中的信息可能已经有所发展或是发生改变。

    比如这个 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 条回复    2022-07-14 17:31:12 +08:00
    TimePPT
        1
    TimePPT  
       2022-07-13 12:37:11 +08:00
    /etc/profile
    /etc/paths
    ~/.bash_profile
    ~/.bash_login
    ~/.profile
    ~/.bashrc
    类似的,全部查一遍。
    dogking2
        2
    dogking2  
    OP
       2022-07-13 13:07:17 +08:00
    @TimePPT find 全局搜索找到了,在这个`/private/etc/paths.d/`路径下
    julyclyde
        3
    julyclyde  
       2022-07-14 10:34:07 +08:00
    @dogking2 find 只能找文件名啊,不能找内容的
    dogking2
        4
    dogking2  
    OP
       2022-07-14 17:31:12 +08:00
    @julyclyde 配合 xargs 搜内容
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1101 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 23:16 · PVG 07:16 · LAX 16:16 · JFK 19:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.