免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1603 | 回复: 5
打印 上一主题 下一主题

总结及疑问:系统参数。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-19 09:31 |只看该作者 |倒序浏览
前几天在论坛上泡着的时候,也发现有人问道了系统参数的问题,自己这里总结一下,同时把自己的疑问谈出来。
首先在系统装好后/.profile这个文件并不存在,所以需要创建,那么问题就来了。
#set
当我们使用这个命令的时候,显示的内容来自于何处  /etc/.profile? 我没有看到这个文件(flatform86 sol10)。我还在/usr下看了也没有。于是我就通过如下步骤:
#set > /.profilecc
#vi /.profilecc
#cp /.profilecc /.profile
#reboot
#set
这时我看到显示的信息是我修改后的/.profile
那么问题就来了,之前没有进行
#set > /.profilecc
操作时显示的内容来自于何处?
关于这个问题,希望能够探个究竟!

论坛徽章:
0
2 [报告]
发表于 2006-01-19 10:38 |只看该作者
Here i post the /etc/profile content:
#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

论坛徽章:
0
3 [报告]
发表于 2006-01-19 13:12 |只看该作者

怎么感觉看的人多,而回的人少?

郁闷!

论坛徽章:
0
4 [报告]
发表于 2006-01-19 13:21 |只看该作者
/etc下不是.profile是profile

论坛徽章:
0
5 [报告]
发表于 2006-01-19 14:25 |只看该作者
终于有人回帖了。

赞一个!

更正有效!

论坛徽章:
0
6 [报告]
发表于 2006-01-20 16:36 |只看该作者
补充下,刚看到的:
The System Profile
For user accounts that use the Bourne (sh) or Korn shell (ksh) as a login shell, commands in the system profile are executed before the user's login initialization file. This file is named /etc/profile and, when executed, it sets a default terminal type (TERM) and then calls umask(1) to set the default file permission mask to 022. If the user's home directory does not include a file named .hushlogin, the user's storage quota is displayed by using quota(1M), the message of the day (if any) is displayed, and a notification message is displayed if new e-mail has arrived for the user.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP