-bash-3.00$ vi homework-1
CS385 Homework Assignment 1a
Subject: customize shell environment start up configuration file(s)
Due Date: Mar. 4, 2008
A. Study and understand each entry in the ".cshrc" and ".tcshrc" (if applicable) under your UNIX home directory on NPU's Sun workstation systems
B. COPY /cs385/.cshrc.base as your template and refer sample files ".cshrc.sample" and ".tcshrc.sample" under /cs385 on NPU48 (ONLY on NPU48!)
C. Polish your VI editing skill, make sure you are comfortable with cursor movement and vi commands
D. Create a duplicate of your current ".cshrc" file; Open 2nd connection to NPU48; edit ".cshrc" with VI:
i. Clean up unwanted and obsoleted entries such as lpath, extra aliases and comment-out lines
ii. Correct environment variables as appropriate, in particular, PATH, MANPATH, most importatnt function keys such as ERASE, INTERRUPT, STOP, SUSPEND, EOF and KILL; creat your favoriate aliases; add variable such as tabs, umask, filec, tty, noclobber, and history et al. set your prompt so it will display (minimum the following) your login-name, hostname (system name) and current working directory.
iii. Save your changes; execute command "source ~/.cshrc" or equivalent(.) in other shell to configure the file
iv. if no error after execution, you are ok; otherwise, repeate steps i through iii until no error
v. customize your .bash_profile in a way similar to above for .cshrc
E. Turn in a hard copy of your customzied ".cshrc" and ".bash_profile" file plus a soft copy to NPU48:/cs385/hmwk/hmwk-1 with a unique name such as "your-unix-login-name.cshrc" and "your-unix-login-name.bash_profile"
F. These who copy AND allow-others-to-copy their homework will get NULL for sure.
======Optional Bonus Questions ======
locate the ssh program embeded finger-print file for security keies on your Windows desktop
when finish:
1.soft.copy-> npu48: /cs385/hmwk/hmwk-1 with unique name.
2.hand.copy-> TA.
1..cshrc npu3 .33 for try csh
[npu3:/home/hanyunfan] cat .cshrc |more
# @(#)Cshrc 1.6 03/03/08 Frank
#################################################################
#
# .cshrc file
#
# For homework of cs385
# C-Shells
#
#################################################################
# Set Core Dump Size
limit coredumpsize 0k
set path = (~ $lpath ~/bin /usr/local/bin /usr/local/netscape /usr/ucb /usr/bin /usr/etc)
setenv MANPATH (/usr/man /usr/local/man)
setenv TERM=vt100
stty erase '^H' kill '^U' intr '^C' eof '^D' stop '^S' suspend '^z'
alias cd 'cd \!*;echo $cwd'
alias cp 'cp -i'
alias mv 'mv -i'
alias rm 'rm -i'
alias pwd 'echo $cwd'
alias h 'history \!* | head -39 | more'
alias dir 'ls'
alias pdw 'echo $cwd'
alias la 'ls -a'
alias ls 'ls -GF'
set ignoreeof # in case of ctrl+d
set noclobber # do not rewite exist file
set history=100
set savehist=40
set filec
set autolist
#set prompt="$USER@'hostname',<$cwd>:"
set prompt="%n%u@%m %~:"
umask 022
#.bash_profile
# Set Core Dump Size
limit coredumpsize 0k
export PATH =~:$lpath:~/bin:/usr/local/bin:/usr/local/netscape:/usr/ucb:/usr/bin:/usr/etc
export MANPATH /usr/man:/usr/local/man
set TERM=vt100;exprot TERM
export EDITOR=vi
stty erase '^H' kill '^U' intr '^C' eof '^D' stop '^S' suspend '^z'
alias cd 'cd \!*;echo $cwd'
alias cp 'cp -i'
alias mv 'mv -i'
alias rm 'rm -i'
alias pwd 'echo $cwd'
alias h 'history \!* | head -39 | more'
alias dir 'ls'
alias pdw 'echo $cwd'
alias la 'ls -a'
alias ls 'ls -GF'
set ignoreeof # in case of ctrl+d
set noclobber # do not rewite exist file
set history=100
set savehist=40
set filec
set autolist
export PS1="[\u@\h \W]\$"
umask 022