Sumedh

CSRHC, TCSHRC Sample File

echo "Start Tcshrc"

setenv EDITOR /bin/vi
source ~/.aliases

setenv PATH /sybopt/bin:$PATH

# Skip remaining steps if not an interactive shell
if ($?TERM == 0 || $?prompt == 0) exit

setenv autologout 0
# Remember my 100 most recent events
set history=100

# Save the most recent 40 events when I log out
set savehist=40

# Don't overwrite existing files with the redirection character ">"
set clobber

# set default protection to be owner (rw), group (rw), others (read only)
umask 022
set autolist
set autoexpand
set autocorrect

# File Completion when you press tab key
set filec

# Tells "filec" not to cry/beep if it can't complete a file.
set nobeep

# Notify me when the status of background jobs change
set notify

# Allow others to send messages directly to my terminal, NO
mesg n

# Don't let me log out by pressing
set ignoreeof

if ( $?CLEARCASE_ROOT ) then
set prompt="\n%B%{\033[34m%}%{\033[31m%}"`basename $CLEARCASE_ROOT`"@%n[%~] %{\033[30m%}%b"
else
set prompt="\n%B%{\033[34m%}%{\033[31m%}%m@%n[%~] %{\033[30m%}%b"
endif

# Displays the list of currently logged in users.
set log set watch=(0 any any)
set who="%n@%M (%a)"

echo "End Tcshrc"



The above tcshrc file is used in a clearcase environment. If you do not use clearcase then remove the "IF" part of clearcase. This file can be used for customizing both csh and tcsh shell environment.



If you want to load a particular shell when you open a connection to the machine in putty, you can enter the shell name in your .login file.

Aliases Sample File

alias ct "/usr/atria/bin/cleartool"
alias sv "/usr/atria/bin/cleartool setview -login"
alias rm "rm -i"
alias cp "cp -i"
alias . "pwd"
alias .. "cd .."
alias / "cd /"
alias cd.. cd ..
alias del "/bin/rm"

alias lsm 'ls -al | more'
alias ltd 'ls -al | grep drw'
alias lth 'ls -alt | head'
alias ltr 'ls -altr '



If you want to learn more about linux and unix advanced environment. I highly recommend reading Unix Power Tools. It contains tips and strategies on customization, document generation, process management, networking and how to work efficiently, elegantly and creatively with the Unix tool suite.


Sumedh Kadoo