Sanjeev Sabhlok's notes on technology, hardware, gardening

Category: Uncategorized

Continue Reading

An example .alias file (very old)

[Note: in Bourne shell, you'll have to put an equal to sign]

#aliases

alias kj  logout

alias al     'alias |more'

alias cdp       cd ~/public-html

alias ch        chmod 604 *

alias cshrc     'pico .cshrc'

alias d   'ls -alF |more'

alias e exit

alias n         'netscape &'

alias p         pine

alias pc        pico

alias pi        pico index.html

alias rhosts    pico .rhosts

alias w         startwin

alias q         quota -v

alias du        /usr/bin/du

alias del rm 

alias pc  pico

alias pending 'pc ~/public-html/Internal/pending.html'

alias d   'ls -alF |more'

alias en  enscript

alias src   'source .cshrc'

alias .c  pico .cshrc

alias gz  gzip

alias guz gunzip

alias f   finger

alias m   more

alias cdi cd ~/public-html/Internal

alias se 'stty erase'

alias z   exit

alias whereis 'find ~/ -name'

Continue Reading

An example .cshrc file (very old)

 

#
# Default user .cshrc file (/bin/csh initialization).
 
# Usage:  Copy this file to a user's home directory and edit it to
# customize it to taste.  It is run by csh each time it starts up.
 
# Set up default command search path:
#
# (For security, this default is a minimal set.)
 
set path=( /bin /usr/bin )
 
# Set up C shell environment:
 
if ( $?prompt ) then# shell is interactive.
   set history=20# previous commands to remember.
   set savehist=20# number to save across sessions.
   set system=`hostname`# name of this system.
   set prompt = "$system \!: "# command prompt.
#
# Aliases:
source .alias
if (-e $HOME/.alias) source $HOME/.alias
 
# Personalized Prompt:
# Type1: 
#set prompt="sabhlok@rcf"\(!\):
#Type 2:
#set prompt="${cwd}> "
#alias cd 'chdir \!*; set prompt = "$cwd> "'
 
#Type 3:
# form: [cmd#]cpu:directory>
set cpu=`hostname | awk '{FS = "."; print $1}'` 
# set cpu = computer name
alias sp      set prompt='$cpu\(!\)$cwd\>\ ' 
# set sp to set the prompt
alias cd      'chdir \!* ; sp' 
# redefine cd command
alias pd      'pushd \!* ; sp'
               # redefine pd command
alias pp      'popd \!* ; sp'
               # redefine pp command
sp              # set the prompt
 
# Change Shell:
echo 'NOTE: Before you proceed, type se [backspace]. Then tcsh'
 
# Don't overwrite existing files with the redirection character ">"
set noclobber
 
# Don't create core dump files when a program blows up.
limit coredumpsize 0
 
# Check to see if this is an interactive shell.
# If not, skip the rest of this file.
if ($?USER == 0 || $?prompt == 0) exit
 
## Set C shell variables
# Remember my 40 most recent events
set history=40
 
# Save the most recent 40 events when I log out
set savehist=40
 
# Substitute the filename to be completed when I type an <ESC> at 
# the command line
set filec
 
# create a log of all work done on the screen
 
echo 'when needed, create a log of the screen by typing script'
echo '  '
cal
echo "Today is:   `date`"
echo '  '
echo "You have `ls|wc -l` files in `pwd`"
echo "Type pending to edit pending list"
echo '  '
Continue Reading