# $Id: unix_laundry-lst.txt,v 1.4 2003/08/28 02:12:15 tjn Exp $ # # Summary/listing of commands for use under Linux/UNIX systems. # This is a laundry list to be...add descriptions later, possibly. # # This also contains some general bullets for Cluster related stuff. # (in no particular order -- with brief example) Warning: UNIX (Linux) typically assumes you know what you're doing and therefore if you say shoot my foot off...it happily cripples you. At first this is painful, but eventually you realize -- just as you dislike Regis asking "Is that your final answer?" -- being prompted for confirmation after clearly stating an opertion gets tedious. man -- man man OR man cat info -- info info OR info cat cat -- cat myfile.txt tee -- cat myfile.txt | tee mylog gv -- gv mydoc.ps xpdf -- xpdf mydoc.pdf gzip/gunzip -- gzip oscar-1.3b1.tar / gunzip oscar-1.3b1.tar.gz tar -- tar -xvf oscar-1.3b1.tar OR tar -xf oscar-1.3b1.tar mkdir -- mkdir mydirectory cd -- cd mydirectory AND cd .. (Remember: case sensitive & must have initial space) rmdir -- rmdir mydirectory mv -- mv OLD NEW cp -- cp SRC DEST rm -- rm FILE or DANGER, DANGER, DANGER to remove a directory and all it's contents....rm -rf MYDIR NOTE: There is no 'undo' in UNIX!!! Be careful! :) vi -- vi myfile.c (see also ".exrc"/" stuff-o below) expand -- expand -4 myfile.c OR expand -4 myfile.c | lpr lpr -- lpr file.txt OR lpr -P ricoh file.txt grep -- grep root /etc/passwd ifconfig -- ifconfig eth0 ping -- ping www.csm.ornl.gov nslookup -- nslookup www.csm.ornl.gov OR nslookup -sil www.csm.ornl.gov cvs -- cvs checkout -d oscar-head oscar (see also CVS notes) make -- make ps (use w/ Makefile. Also use for 'test.c' as make test) ctags ssh -- ssh msr.csm.ornl.gov OR ssh -l thomasn odie.csm.ornl.gov scp -- scp stuff.tar.gz thomasn@odie.csm.ornl.gov:/tmp xterm fg -- fg 1 (see also CTRL+Z below) pwd pushd -- pushd /tmp OR pushd OR pushd +2 popd -- popd find -- find /etc -name host* OR find /etc | grep networking gcc -- gcc prog1.c -o prog1 (C compiler) -I to extend the search path for headers (same for g++) -L to extend the search path for libs (same for g++) -l to link with a given library (same for g++) gcc prog1.c -o prog1 -I ./myhdrs -L ./mylibs -lm g++ -- g++ prog2.cc -o prog2 (C++ compiler) ddd -- ddd a.out & (Graphical debugger) rpm -- rpm -ivh c3-3.1-1.noarch.rpm pine ls -- ls -l OR ls /tmp OR ls -la mydir/ more less wc script sort uniq whoami hostname uname locate -- locate ifconfig (NOTE: possibly need update 'locate -u' as root) head -- head -2 /etc/passwd OR head /etc/passwd tail -- tail /etc/passwd OR tail -f /var/log/messages netcfg neat printtool tksysv chkconfig -- chkconfig --list OR chkconfig --level 2345 sendmail off xdpyinfo -- display information about an X server (see also XDPYINFO(1)) Redirection: $ a.out > log1 $ a.out > log2 2>&1 $ a.out 2>&1 | tee log3 NOTE: The 1 & 2 are related to the standard UNIX file descriptor values, 0=STDIN (standard input) 1=STDOUT (standard output) 2=STDERR (standard error) Unix Nomenclature/misc: * CMD --help to get the cmd usage information * --long long extention version e.g. ls --classify -l short extention version e.g. ls -F * pipes between commands e.g. cat /etc/passwd | grep root take output (STDOUT) of 'cat' and send as input (STDIN) to 'grep' * start job in background, e.g. gv mydoc.ps & * suspend running (current) job & put in background, [CTRL]+[Z] Cluster Stuff: + oscar + pvm + mpi: lam/mpi, mpich - mpicc, mpirun + pbs: qsub, qstat, qdel, etc. (see also pbs.txt) + c3: cexec, cpush, etc... (see Brian! :) + networking + benchmarks ============================================================================== " " .exrc vi/vim configuration file " that was hacked from the default generated by MTSU's configure script " I've added a few other options and turned on some of the commented " parts as needed " " tjn 4/12/01 2:12a " set autoindent set tabstop=4 set shiftwidth=4 set wrapmargin=10 " "set ignorecase "set nowrapscan " set showmode set autoprint set report=2 set nomagic set noterse " set nomesg set noslowopen set nonumber " "map ; : "map g :% "map m !} fmt -c "map m !} fmt -81 "map T !} sort " For color highlighting in vim " turn off Search result bg coloring, easier to see on reverse (black) term highlight Search NONE " set comments to light blue, instead of dark blue, easier on (black) term highlight Comment ctermfg=6 " to turn on numbering (set to nonumber above) " set nu ==============================================================================