用bash清理$PATH
发布时间:2020-12-16 01:17:51 所属栏目:安全 来源:网络整理
导读:我的路径有很多很久以前由脚本添加的条目.它们不在我的.bashrc,.bash_profile或.bash_login中. 我担心在.bashrc中重置我的路径会产生不良的长期结果.有没有办法找到添加到我的路径的地方并手动删除它们?事物是总是按文件添加还是路径缓存在某个地方?如果是
我的路径有很多很久以前由脚本添加的条目.它们不在我的.bashrc,.bash_profile或.bash_login中.
我担心在.bashrc中重置我的路径会产生不良的长期结果.有没有办法找到添加到我的路径的地方并手动删除它们?事物是总是按文件添加还是路径缓存在某个地方?如果是后者,是否容易清理?
找到修改PATH的最简单方法是运行:
$bash --login -i -xv 2>&1 | grep ' . ' 比如我得到了: + . /etc/profile.d/bash_completion.sh . /etc/bash_completion ++ . /etc/bash_completion +++ . /etc/bash_completion.d/abook +++ . /etc/bash_completion.d/ant + . /etc/profile.d/lapack0.sh + . /etc/profile.d/openssl.sh + . /etc/profile.d/qt3-devel.sh + . /etc/profile.d/tetex-profile.sh + . /etc/profile.d/xinit.sh + . /etc/bash.bashrc … (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 简述container与container-fluid的区别
- angularjs – Angular $timeout – TypeError:object不是函
- WebServices 简介
- 混合开发 Hybird Ionic Angular Cordova web 跨平台
- scala – (Play 2.0)为AnyContent设置最大POST大小
- 2、Angular JS 学习笔记 - 双向数据绑定和Scope概念
- 【K8S】K8S 1.18.2安装dashboard(基于kubernetes-dashboar
- angular2 – 在Angular 2中停止事件传播
- Kubernetes / Docker的HTTP(S)负载平衡
- scala – 展平密封的case类层次结构