本帖最后由 gamester88 于 2010-09-12 09:18 编辑 pathmunge () { if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then if [ "$2" = "after" ] ; then PATH=$PATH:$1 else PATH=$1:$PATH fi fi } (1)这里的$PATH是从哪里得到的? (2) if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then if [ "$2" = "after" ] ; 这句语句的作用?...
[free]# Path manipulation if [ "$EUID" = "0" ]; then pathmunge /sbin pathmunge /usr/sbin pathmunge /usr/local/sbin [/free]修改前 [free]# Path manipulation if [ "$EUID" = "0" ]; then pathmunge /sbin pathmunge /usr/sbin pathmunge /usr/local/sbin pathmunge /usr/sbin [/free] 修改后。。。 这样应该没有问题吧。。 我不懂C语言。。 但是看到这里 应该...
我希望 /usr/local/svn/bin 下的所有程序在任何目录下都能直接运行---想把这个路径加入到root的 /etc/profile 当中。 请问应该加到下图中的那一行? 第一个画红圈的行,还是第个画红圈的那一行?
不小心使用命令cat /dev/null > .bash_profile 结果启动后不能自动进入bash shell 将其他用户的profile加入 .bash_profile,其内容如下: # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:/HOME/bin export PATH unset USERNAME 但是每次进入root用户后出现提示:-bash: /root: is a directory 这是什么原...
$ pwd /etc $ vi profile 在这里加了些东西 :X 回车 出现文件只读提示如下, "profile" File is read only 应该怎么解决这问题,谢谢 在装oracle时改那profile时,我是用oracle用户登进去的,然后在/etc下的profile改它,也不知道profil是不是都在etc下?
$ pwd /etc $ vi profile 在这里加了些东西 :X 回车 出现文件只读提示如下, \"profile\" File is read only 应该怎么解决这问题,谢谢 在装oracle时改那profile时,我是用oracle用户登进去的,然后在/etc下的profile改它,也不知道profil是不是都在etc下?
误删了.profile中某项之后,每次切换到notes用户时提示: # su - notes .profile[26]: tes/notesdata:/notes/lotus/notes/latest/ibmpow/res/C:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/notes/bin:/usr/bin/X11:/sbin:.: not found. .profile[27]: xport: not found. .profile[97]: xport: not found. 但Domino server还可以正常启动,但在.profile中以vi添加 PATH=tes/notesdata:/notes/lotus/notes/latest/ibmpow/res/C:/u...