08/28/2008 Linux basics: cd change directory, cd ../ move a level up. cp fln1.ext fln2.ext copies fln1.ext to fln2.ext. Be careful: overwrites fln2.txt. ls lists all the files in the directory. ls -Fal lists with a number of attributes. rm fln.ext removes fln.txt All classroom PCs can be accessed via the internet. From another Linux machine (or via cygwin from a Windows computer) use the following command: ssh -X usn@classnn.scs.fsu.edu nn=01,02,... is the number of the PC you choose. -X allows to see graphics on your remote monitor (in cygwin you need to use the X-terminal). Depending on your name and on which machine you are already, not everything may be needed. All your files are visible on any classroom PC. top show the present load of the PC you are on. If you want to submit heavy computing, try to find an empty one. To move files from one Linux PC to another use scp fln.ext PCname.webaddress:. back: scp PCname.webaddress:fln.ext . To move an entire directory tree, create a compressed archive first: tar -zcvf fln.tgz dirname/ unfold with (like for STMC) tar -zxvf fln.tgz vi editor basics: i insert, I insert at end of line. o,O open a new line for writing in the insert mode behind, before the line where you are. escape key: to get out of insert mode. :q quit. :w write without quitting. :wq write quit. :q! quit without saving anything. x,X deletes character. dd deletes one line, 17dd deletes 17 lines, etc. yy yanks one line, 17dd yanks 17 lines, etc. p,P paste the line(s) behind, before where you are. D delets end of line. STMC: Created folder work/0829. Made there testruns with the Marsaglia random number generator. 08/31/2006 Fortran: computer word (32 bits, 64 bits), bits, Bytes. 1B=8b. declarations: integer*4, real*4, real*8, logical. Implicit declaration of variables: implicit.sta in STMC. Largest integer: 2**31-1, smallest integer -2**31. INT(x) truncates to lower integer (positive x). NINT(x) nearest integer. Output unit 6: Monitor. Output units >=8 are files. Write example: write(iuo,'(" text",formats)') variables Possible formats (n,xx,yy integers): nIxx for integers, nFxx.yy, nGxx.yy for real, nAxx for character variables, nLxx for logical variables. Best try them all out. 9/12/2006 Linux: ===== cat /proc/cpuinfo CPU info. ./a.out > fln.txt re-direct output to fln.txt. ./a.out > fln.txt & run in background. ./a.out > &fln.txt& in tcsh only: re-direct also system messages to fln.txt. Example: g77 -O fln.f > &fln.txt& . 10/12/2006 More on running jobs: ===================== top Lists the top CPU users. Exist with "q". Long runs in the background: Use renice +19. How to measure CPU time on long runs: Use the mini-script CPtime as given in the book and run with CPUtime > & fln.txt & The first "&" re-directs system output from the monitor to the file. This works only in the tcshell of Linux. If you are in another shell (e.g., bash), type "tcp" to enter the tcshell. If you write the CPUtime file from scratch, you may have to make it an executable file. This works with "chmod +7777 CPUtime". Learn Linux to figure out what the chmod comand does and its options. 8/28/2007 pdf: kpdf. ghostview: kghostview. gnuplot driver files can be found in the STMC assignments. Look out for *.plt. You can convert eps to pdf files with epstopdf.