-----------------------------------------------------------------------------

"man tcsh" gives a list of commands and other stuff

-----------------------------------------------------------------------------
History list: (man history and man tcsh for more details)

history                 -- Give history list

!{num}                  -- Executes command numbered {num}
!{str}                  -- Executes last command that began with {str}.
!!                      -- Execute previous command.
!! | more               -- Execute previous command and pipe it into more.

{str}[M-p]              -- Finds command beginning with {str} and places it
                             on the command line


-----------------------------------------------------------------------------
Key bindings: (man tcsh for more details)

bindkey                 -- Gives list of keybindings
bindkey "^o" overwrite-mode  
                        -- Binds ^o to overwrite toggle (case sensitive).

^A                      -- Beginning of line (a la EMACS).
^E                      -- End of line.

-----------------------------------------------------------------------------
Man Command:

 Return or Enter
      Advances the display by one line.

  Space Bar
      Advances the display by one screen.

  u   Backs up the display by one half screen.

  /string
      Searches for the first instance of the specified string.

  n   Searches for the next instance of the string specified by a preceding
      /string directive.

  q   Stops the display.

-----------------------------------------------------------------------------
Colors:

see the file for a color list:
    /usr/lib/X11/rgb.txt

-----------------------------------------------------------------------------
Emacs:

F90 lisp input file:
    /usr/local/share/emacs/19.34/lisp/f90.el

-----------------------------------------------------------------------------
Decompression:

compress -d {file}      -- Decompress .Z files
tar xvf {file}          -- Unarchive .tar files
patch {patchfile}       -- Patch in patch file
                         
-----------------------------------------------------------------------------
Disk Quota:

Use the du command to see how much space your files are taking up.

/disk1 is the local disk which has no disk quota limits.

On cesr39:  /cdat/cesr38/disk1   -- To path to /disk1    
On lns101:  /usr/sbin/quota      -- Show disk quota on lns101

-----------------------------------------------------------------------------
CESR Unix machines:

CESR38  -- 500 MHz
CESR65  -- 433 MHz
CESR66  -- 1GHz, Coordinate with Zipi and Rongli Geng


-----------------------------------------------------------------------------
Directory Stuff:

$HOME                   -- Home directory
~                       -- Your Home directory
~welch                  -- Welch's home directory
.                       -- Current directory
..                      -- Parent directory
*                       -- Wild Card

-----------------------------------------------------------------------------
Command Line Magic:

|                       -- Pipe

{c1} ; {c2}             -- Separates commands on a line
{c1} && {c2}            -- Executes {c2} if {c1} completes OK

{command} &             -- Executes in background or with detatched process.

} {file}                -- Extablishes where output goes
}! {file}               -- Output to {file} with even with noclobber on.
}} {file}               -- Append output to {file}

{ {file}                -- Establishes where input comes from

`{command}`             -- Execute this command and put the output on
                             the command line.
cp `grep -l abc *` ..   -- Takes all files in the current directory where 
                             there is a match to the string "abc" and makes
                             a copy in the parent directory.

-----------------------------------------------------------------------------
Command List:

awprint {file}          -- Prints file

cat {file}              -- Type contents of {file} on screen
cat } {file} .... ^D    -- Create {file} with input terminated with ^D
cat {in1} {in2} } {out} -- Concatinate {in1} and {in2} and direct result 
                                                                into {out} 
cat {in1} {in2} }} {out} -- Append {in1} and {in2} to {out}


cd                      -- Change to Home directory
cd ~/{dir}              -- Change to $HOME/{dir}
cd {dir}                -- Change to {dir} subdirectory
cd ..                   -- Change to parent directory

 421421421
drwxrwxrwx              -- Permission field: directory|user|group|others

chmod 777 {file}        -- Change permission
chmod +r {file}         -- Grant write permission
chmod -r {file}         -- Remove write permission
chmod +x {file}         -- Grant execute permission

cp {file1} {file2}      -- Copies {file1} to {file2}
cp {file1} .            -- Copies {file1} to the current directory. 
cp -r {dir1} {dir2}     -- Copies recursively from one directory to another

dcp {file1} {file2}     -- Dec copy from {file1} to {file2}
dcp lns62/dcs/xxx::"u:[...]x.y" x.y

du -ks .                -- File size total from current directory down
du -ks *                -- File size totals of sub-directories of current dir.

dvips -D {dpi} -p {first_page} -l {last_page} -o {out_name}
                        -- dvi to ps converter

find ~/ -name {file} - print  
                        -- Finds which directory {file} is in
find {dir} -name "name" -- List files Searching all subdirectories of {dir}

ghostview {file}        -- PS viewer.

grep {exp} {file}       -- Find lines in {file} that contain expression {exp} 

kpasswd                 -- Changes the user password. Also see passwd.

ln -s {to} {from}       -- Create a softlink. 

ls                      -- List files
ls -1                   -- List one file per line
ls -a                   -- List .* files also
ls -l                   -- List files with security
ls -s                   -- List size of each file
ls {dir}                -- List files in subdirectory {dir}
ls -R {dir}             -- List files and subfiles of {dir}

man - k {keyword}       -- Search 1 line descriptions for keyword

more {file} (sys V: pg) -- Type {file}

mkdir                   -- Create a directory

nm  {object_file}       -- Shows the subroutine names in an object file.

mv {file1} {file2}      -- Move (rename) {file1} to {file2}
mv {file1} .            -- Move {file1} to the current directory.

passwd                  -- Changes the user password. Also see kpasswd.

ps                      -- Prints processes.

pushd ~                 -- Make home directory your current directory

pwd                     -- Print working directory

rm -i {file}            -- Remove {file} with require query
rm {f1} {f2} {f3}       -- Remove multiple files
rm -r {dir}             -- Remove directory and all subfiles
rmdir {dir}             -- Remove directory if directory is empty

set                     -- Shows settings
set {variable}          -- Sets variable
set noclobber           -- Prevents overwriting of files by output redirection.
unset {variable}        -- Unset something that has been set.

setenv DISPALY {node}   -- Open X-windows on remote node

sort -r {file}          -- Reverse sort of {file}
sort {file1} } {file2}  -- Sort {file1} and direct into {file2}

source .cshrc           -- Reread .cshrc file.
source .login           -- Reread .login file.

spell {file}            -- Spell check {file}

xfontsel                -- Program to view the fonts on your computer.

kill {num}              -- Kill process {num}
kill -KILL {num}        -- Kill even the SOB's who ignore a plain kill
kill 0                  -- Kill all processes except those with PIDs 0 and 1.
kill -KILL 0            -- This will kill even your login shell
stop {num}              -- Stop process {num}

top                     -- Show top processes on the computer (like DISPLAY)

unstripe {psfile}       -- Unstripes a PS file.

wc {file}               -- Word Count: Output number of lines, words, and characters in {file}
wc -l {file}            -- Ouput number of lines in {file}

which {command}         -- Shows path of {command}