出  处: rose.dlut.edu.cn
  === == === == === == === == === == === == === == === == === == === == === == 基本设定档案 ~/.login === == === == === == === == === == === == === == === == === == === == === == 发信人: watson@ccsun24 (watson), 信区: Unix, 日期: Aug 27 15:36 标  题: Between .cshrc & .login 发信站: 交大资工天龙新闻社
  小套套 (Smart@phoenix) wrote: > Hi pals:     i have a question about .login & .cshrc ! >           what different between these two files?
  login  :  will be executed whenever you login a terminal, where your            environment variables are set here. Won't be executed again            once you change the shell.
  cshrc (or other shells) : will executed everytime a shell is created,                            where aliasing & some shell scripts are set                            here.
  You can imagine their purposes to the 'config.sys' & 'autoexec.bat' of DOS respectively, but don't have a mind that they are similar at all!
  ---------------------------------------------------------------------
 
  # @(#)Cshrc 1.6 91/09/05 SMI ################################################################# # #         .cshrc file # #         initial setup file for both interactive and noninteractive #         C-Shells # #################################################################
 
  # Set openwin as my default window system set mychoice=openwin
  #         set up search path
  # add directories for local commands set lpath = ( ) if ( ${?mychoice} != 0 ) then         if ( ${mychoice} == "openwin" ) then                 set lpath = ( /usr/openwin/bin/xview /usr/openwin/bin $lpath )         endif endif
  set path = (. ~ $lpath ~/bin /usr/local /usr/ucb /usr/bin /usr/etc)
  #         cd path
  #set lcd = ( )  #  add parents of frequently used directories #set cdpath = (.. ~ ~/bin ~/src $lcd)
  #         set this for all shells
  set noclobber
  #         aliases for all shells
  alias cd            'cd \!*;echo $cwd' alias cp            'cp -i' alias mv            'mv -i' alias rm            'rm -i' alias pwd           'echo $cwd' #alias del          'rm -i' #umask 002
  #         skip remaining setup if not an interactive shell
  if ($?USER == 0 || $?prompt == 0) exit
  #          settings  for interactive shells
  set history=40 set ignoreeof #set notify #set savehist=40 #set prompt="% " #set prompt="`hostname`{`whoami`}\!: " #set time=100
  #          commands for interactive shells
  #date #pwd
  #         other aliases
  #alias a            alias #alias h            'history \!* | head -39 | more' #alias u            unalias
  #alias             clear #alias list         cat #alias lock          lockscreen #alias m             more #alias mroe          more #alias type         more
  #alias .             'echo $cwd' #alias ..            'set dot=$cwd;cd ..' #alias ,             'cd $dot '
  #alias dir          ls #alias pdw           'echo $cwd' #alias la            'ls -a' #alias ll            'ls -la' #alias ls           'ls -F'
  #alias pd           dirs #alias po           popd #alias pp           pushd
  #alias +w            'chmod go+w' #alias -w            'chmod go-w' #alias x             'chmod +x'
  #alias j             'jobs -l'
  #alias bye           logout #alias ciao          logout #alias adios         logout
  #alias psg           'ps -ax | grep \!* | grep -v grep' #alias punt          kill
  #alias r            rlogin #alias run          source
  #alias nms 'tbl \!* | nroff -ms | more'                  # nroff -ms #alias tms 'tbl \!* | troff -t -ms >! troff.output &'    # troff -ms #alias tpr 'tbl \!* | troff -t -ms | lpr -t &'           # troff & print #alias ppr 'lpr -t \!* &'                                # print troffed
  #alias lp1           'lpr -P1' #alias lq1           'lpq -P1' #alias lr1           'lprm -P1'
  #alias sd           'screendump | rastrepl | lpr -v &'
  #alias edit         textedit
  #alias help          man #alias key           'man -k'
  #alias mkae          make
  -- ※ 来源:.碧海青天 bbs.dlut.edu.cn.[FROM: 202.118.65.49]
  | 
 
 
 |