LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 558|回复: 1

求助:各位大哥来帮帮我看看这个路径问题(fedora 4),谢谢!

[复制链接]
发表于 2006-11-23 18:02:30 | 显示全部楼层 |阅读模式
请教:

首先要添加的路径是:
PATH=$PATH:/usr/local/arm/3.4/bin:/usr/local/arm/3.2.1-elf/bin

问题1:

为什么我用 #ls -a 找不到 profile 和  bash_profile 文件呢?

而用 VI 可以进入他们呢?


问题2:
现在 /etc/profile 如下:

pathmunge () {
        if ! echo $PATH | /bin/egrep -q "(^|$1($|" ; then
           if [ "$2" = "after" ] ; then
              PATH=$PATH1
           else
              PATH=$1PATH
           fi
        fi
}

# Path manipulation
if [ $EUID = 0 ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after
"/etc/profile" 49L, 840C

是不是把它变为:

pathmunge () {
        if ! echo $PATH | /bin/egrep -q "(^|$1($|" ; then
           if [ "$2" = "after" ] ; then
              PATH=$PATH1
           else
              PATH=$1PATH
           fi
        fi
}

# Path manipulation
if [ $EUID = 0 ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after
"/etc/profile" 49L, 840C

PATH=$PATH:/usr/local/arm/3.4/bin:/usr/local/arm/3.2.1-elf/bin


问题3:
现在 .bash_profile 如下:

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATHHOME/bin

export PATH
unset USERNAME
~
~
~
~
~
~
~
~
~
~
".bash_profile" 13L, 191C


是不是把它变为:

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATHHOME/bin

export PATH
unset USERNAME
~
.bash_profile" 13L, 191C


PATH=$PATH:/usr/local/arm/3.4/bin:/usr/local/arm/3.2.1-elf/bin


谢谢!
 楼主| 发表于 2006-11-24 08:44:49 | 显示全部楼层
各位大哥来帮帮我啊!
谢谢!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表