solaris下设置访问路径

来源:互联网 发布:阿里大数据面试 编辑:程序博客网 时间:2024/06/08 12:05

通过修改/etc/profile文件可以设置文件路径:

# more profile  
#ident  "@(#)profile    1.19    01/03/13 SMI"   /* SVr4.0 1.3   */

# The profile that all logins get before using their own .profile.

trap ""  2 3
export LOGNAME PATH

if [ "$TERM" = "" ]
then
        if /bin/i386
        then
                TERM=sun-color
        else
                TERM=sun
        fi
        export TERM
fi

#       Login and -su shells get /etc/profile services.
#       -rsh is given its environment in its .profile.

case "$0" in
-sh | -ksh | -jsh | -bash)

        if [ ! -f .hushlogin ]
        then
                /usr/sbin/quota
                #       Allow the user to break the Message-Of-The-Day only.
                trap "trap '' 2"  2
                /bin/cat -s /etc/motd
                trap "" 2

                /bin/mail -E
                case $? in
                0)
                        echo "You have new mail."
                        ;;
                2)
                        echo "You have mail."
                        ;;
                esac
        fi
esac

umask 022
trap  2 3
CVSROOT=/export/home0/cvsroot/
export CVSROOT
PATH=$PATH:/usr/local/bin
export PATH

 

 

最后一行就是增加cvs服务后 cvs命令的存放路径,增加后不管用什么用户登录,在什么路径下都可以使用cvs的相关命令。同理,如果需要设置其他程序的命令,在PATH=$PATH:/usr/local/bin 后增加即可,用:分隔

原创粉丝点击