Random Commands


Home Page


dvips -Ppdf -t letter sample.dvi : make a .ps file that looks good as a pdf

ln -s /u/iandd/test/dir/* . : SIM LINK ALL FILES IN /dir

Fortran Flags:
-Ktrap=fp -this catches floating point errors (ie divide by 0)
Bash scripting:
helpful page

Example script:
#!/bin/bash
# script to convert ps files in directory to jpgs
DIR="/a/iandd/ttcode/andy7/idl/movieframes/"
FILENAME="frame"
IMGS="$DIR/$FILENAME*"
for f in $IMGS
do convert $f "$DIR""$(basename $f .ps)".jpg
done
exit 0
use chmod u+x scriptname to change it to an executable
note: the '*' charater stands for all the preceding characters, the '&' character only stands for the current one
To run the entire script in the background use: nohup ./script &

upsand makefiles

scp iandd@blah.blah:~/dir/'*' . copy all the files from the directory on the other machine

find . -name "*.dat" find (and list) all the files satisfing "*.dat"

find . -name "*.dat" -exec gzip {} \; find (and list) all the files satisfing "*.dat", then execute gzip on all those files

Procedure for making IDL plots share axis:
Define pos1=[X0,Y0,X1,Y1] where (x0,y0) is the bottom left corner and (x1,y1) is upper right
use keyword pos=pos1 and then repeate for each plot on page
ystyle=8 in plot will supress one axis
axis,/yaxis,ytitle='!6Radius (10!U10!N cm)' creates a new one

Standard procedure for downloading a program off the internet
run the ./configure file with desired flags found at ./configure --help
type make
type make install
you can add a link to the executable in ~/bin (which is in your path) by ln -s ~/dirpath/executable

identify filename
tells you the type of file
mount /mnt/floppy mount the floppy disk, first put in disk.
umount /mnt/floppy unmount the floppy disk, do before taking out!

pdf2ps filename.pdf converts pdf->ps

rpm -i filename installs a .rpm file (must be root)

su changes user to root

echo $PATH shows your path

df tells you about your disk usage

cntrl-x ( start defining a macro
cntrl-x ) end defining a macro
cntrl-x e execute the macro
cntrl-u 10 cntrl-x e execute 10 ten lines of macro

at top left-hand of col: cntrl-space deletes a col
at bottom right-hand of col: cntrl-x,r,k in an emacs buffer

emacs -nw filename opens emacs in the window instead of a new one

cntl-r suppresses email list - put names in bbc

diff file file~ shows changes made from backup saving

lprm #### remove a certain job from the que

/opt/share/recipes directory with functions in it to share!

rm -rf ./directory removes the entire directory and all subdirectories without prompting you
rm *~ removes all backup files in dir

lpq check on printing

ls -la see everything

ps aux | grep iandd | more list the processes I'm running

kill -9 ##### kill process ### via the command line

startx starts x windows

.tcshrc look at configuration

du -s -k . look at size of files

du -h tells the size of all the files in kilobytes and gygabytes
df tells how the memory on different partitions is used
ln -s /data/iandd/files . links data directory to current location

Emacs:
Esc-x-font-lock-mode : colors
Esc-q : justify

distill (changes ps into a ps, or other way around)

cc filename.c -lm

Tar:
tar -cvf ian.tar Ian/
gzip ian.tar

/*from next computer*/
scp gst212@laurel:/u/gst212/ian.tar.gz .
gunzip ian.tar.gz
tar tvzf ian.tar.gz (this tells whats in the file)
tar xvf ian.tar

pgf77 -V prints the version of whatever on the screen

more /proc/cpuinfo prints out info about my cpu

open(1,filename='test',status='new',format='unformatted')
write(1) Use this to write a binary file in fortran

emacs commands


alt / : compleate words in emacs buffers

/* To get an output file telling how much time you program takes in each subroutine,*/
compile program with -pg flag : f77 -pg test.f -o runit
./runit
should create a file called 'gmon.out
use: gprof runit > out.profile

IDL infinity (structure): help,!values,struc,/str