"status" value for previous command: $? Command recall (tcsh) > !cmd:p \ ":p" says "paste command in history, but do not execute" Then must up-arrow once to get command to edit. Setting shell variables: o sh: > sts=$? \ Note: no spaces allowed o csh: > set sts = $? \ \ Note: spaces are REQUIRED "if" command (see also "if" alternate, below) o sh: if (test -f filename) ; then echo Woof ; fi OR if [ -f filename ] ; then echo Woof ; fi \ NOTE: all one line, no semi-colon after "then" o csh: if ( -d $1 ) then echo $1 is directory else if ( -e $1 ) then echo File $1 exists else echo $1 does not exist endif "if" alternate (all shells?) > cmp -s file1 file2 && echo Files identical || echo Files differ \ Note: each test appears to be implicitly (xxx == 0), so first conditional is "true", strange to say. Looping: o sh: (may be all one line) for i in ..list-of-words.. ; do echo $i done o csh: (must be on separate lines) foreach i ( ..list-of-words.. ) echo $i end Binary files: o ldd [filenames] Show resolution to all library dependencies o nm [filename] Searches for entry points and globals -r to show filename o strings [filename] Search for text strings in file Differences: diff: display differences between files sdiff: side-by-side version of diff cmp: location of first difference; -s reports sts only (it's quiet) Man pages to file: man test | col -b > test.man File links: > ln -s ./existing_file_or_dir xxx -- This creates the link "xxx" > rm xxx -- Removes the link only. Original file/directory is ok. Mounted file systems: > showmount -a birch.pppl.gov Shared libraries: (see gibney$:[handbook]uxix_compile_link.mem) Printers: lpq -Pname :Check printer queue lpr -Pname :Submit print requst lprm -Pname ids :Remove ids from queue (get ids from lpq) ..also.. lp lpstat