gpt4 book ai didi

linux - 在 Linux 上清理 echo $PATH

转载 作者:太空宇宙 更新时间:2023-11-04 10:46:46 25 4
gpt4 key购买 nike

<分区>

我正在努力完全理解我的 centos 操作系统上的路径设置。我确保始终在 .bashrc 中设置我需要的内容,但是当我运行 echo $PATH 时,我得到了大量的东西和重复我不想要路径的一部分。它从哪里得到这个,我如何清理那里的所有内容以仅反射(reflect)我在 .bashrc 中放入的内容。这也导致我的系统读取一个我不希望它找到的二进制文件,因为它位于 echo $PATH 中。这是我的 echo $PATH 的完整结果:

PATH=/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/ebs/anaconda3/bin:/opt/jdk1.8.0_60/bin:/opt/jdk1.8.0_60/jre/bin:/usr/local/bin:/usr/bin:/usr/local/maven/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:/ebs/spark1.5/bin:/usr/local/rvm/gems/ruby-1.9.3-p551/bin:/usr/local/rvm/gems/ruby-1.9.3-p551@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p551/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/rvm/bin

这是我的 .bashrc 中的内容:

export SBT_HOME=/usr/local/sbt
export R_HOME=/usr/local/R-3.1.2
export JAVA_HOME=/opt/jdk1.8.0_60
export JRE_HOME=/opt/jdk1.8.0_60/jre
export M2_HOME=/usr/local/maven
export SPARK_HOME=/ebs/spark1.5
export PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin:/usr/local/bin:/usr/bin:${M2_HOME}/bin:/ebs/wfx-etl/scripts:/ebs/config:/usr/local/go/bin:${SPARK_HOME}/bin:$PATH
export PATH=/ebs/anaconda3/bin:$PATH
export PGPASSFILE=$HOME/.pgpass.conf
export EDITOR=vim

25 4 0
文章推荐: javascript - 如何使用 style.left 从右向左移动图像?
文章推荐: jquery - 通过 jQuery 使字段只读
文章推荐: html - 将子元素