( Everything you need to start on one page! )
PDF for printing
____________________________ Unix / Linux __________________________
You need to know about a dozen commands to function in any operating
system. Unix commands are short and mnemonic and very natural.
Most of them take various -flags to modify their action. You can use
alias newname "something" to name "something" to "newname".
e.g. alias dir 'ls -lF'
All aliases and customizations may be placed in your ~/.tcshrc file.
~/ refers to the home dir, ./ to current dir, ../ to parent dir
In general, command -h :shows the usage (syntax)
man command :will tell you more than you want to know!
Here is a list of essential commands [and useful aliases]:
ls = list [ alias l 'ls -FC' ], [ alias d 'ls -lF \!* | more' ]
cp = copy [ alias cp 'cp -ip' ]
mv = move, rename [ alias r 'mv -i' ]
cd = change dir
rm = remove (delete) [alias rm '/bin/rm -ir'],[ alias del /bin/rm ]
vi = visual editor (the standard Unix editor, see below)
more = display a file page-by-page
mkdir = make dir
rmdir = remove dir
man = manual (help) on a command
chmod = change mode of file (set permissions)
logout = log off the machine
ssh = log on to another machine (secure shell)
scp = (secure cp) copy files between machines
There are hundreds of other commands/tools, do: xman to see them.
_______________________________ vi editor______________________________
vi filename starts vi on the file, you'll be in command mode
ZZ write (save) and exit :q! quit (exit) without saving
h, j, k, l move cursor left, down, up, right
H to top of page L to bottom of page
^F page forward ^B page backward
1G to top of file G to bottom of file
i insert ...ESC a append (after cursor) ...ESC
o open new line ...ESC O open new line above cursor...ESC
x delete character r replace character R ...ESC replace
dw delete word dd delete line D delete to end-of-line
Y :yank line(store in buffer) 3Y :yank 3 lines 4dd :delete 4 lines
p :put (write whatever is in buffer, below cursor) P :put above cursor
u :undo last change J :join lines(current with next)
There are many,many more commands and customizations, but these are the
most essential. Current free incarnation is VIM, for linux, Win,...
Best compress/archive utility. zip -h , unzip -h show the options.
I use the following aliases:
alias zp 'zip -oy' # preserve date,skip links
alias zpd 'zip -oymr' # also -m: delete zipped files
alias zpdr 'zip -oyr' # also -r: recurse into subdir's
alias zz 'unzip -l' # list zipped files without extracting
alias uz unzip # extract contents of zip-file
_______________________________ X Windows _____________________________
Each window is an xterm, emulating a terminal. A window manager (such
as gnome) manages all the windows and the mouse. Can be customized.
The greatest thing about X is that you can run on a remote machine and
display its output on your screen, immensely useful !!!
______________________________ Fortran / C ____________________________
gfortran code.f :compile Fortran code.f and produce executable a.out
gcc code.c :compile C code.c and produce executable a.out
______________________________ Run a code ____________________________
The standard input/output device is the screen, unless redirected, e.g.
a.out will read and write to the screen, but
a.out < dat will read from "dat" and write to screen
a.out < dat > out will read from "dat" and write to "out".
______________________________ Plotting _____________________________
Simplest, nicest (and free) plotting tool ever is: gnuplot
Start gnuplot with: gnuplot, then do: help plot , help set
Everything is on line, nothing to remember !!! Try this:
gnuplot> plot [-4:4] sin(pi*x), cos(pi*x/2) with lines | points
You can get a Windows version for your PC from
©1994-now V. Alexiades (email@example.com)