Ghostview orientationThe orientation of documents displayed with ghostview can be changed by using the numbers 7, 8 and 9. | |||||||||||||||
keysGenerate public-private key pairs withssh-keygenmake a key for a specific Manchester machine, and have a copy of info at SLAC. Then bbftp -Suses key I generated (instead of -s and needing password) wgetwget <URL>saves a webpage without having to load in browser. Seems to have problems with firewalls/proxies. | |||||||||||||||
Unix utilitiesconvert - converts between file formats - seems to be available on most machines.help: convert --help Other important use: Concatenate files into one file - e.g. convert file1.ps file2.ps joined_file.ps
distill - possibly SLAC only - converts PS to small PDF Slides and other landscape format latex documents get displayed poorly by ghostview, often when you use 'gv' the document is displayed in landscape format, thereby slicing the edge of the slide. To avoid this (ref: FJ): dvips -tlandscape -o postscript.ps filename.dviThis should make the gv page landscape as well as the actual slides. changing into a random directory pushd dirname
Colour-coded directory listings Caveat: doesn't work on sun1 - possibly on all suns! (Fine on linux) ls --colorshows files, directories, files with global permits, links, etc, with different colours. On bash: alias lsc='ls --color' To see what was edited most recently: ls -ltrFlags mean: l - long listing t - time ordering r - reverse order All files (i.e. including dot files) by time order: ls -altrTo list files in (reverse) size order: ls -sSr Don't beep: In an xterm: xset -b(presumably xset +b will reset beeping to normal). In gnome, use terminal-settings-preferences. Running emacs without X windows: This is useful for quick editing! emacs -nw file.tex
Putting in a line of repeated characters: ctrl-# ctrl-# chare.g. ctrl-5 ctrl-6 *gives 56 stars! If some leaves a screen locked can kill session manager with ctrl-alt-bksp To shut down properly (equivalent to "halt" and the login screen) ctrl-alt-bksp-deletewhere here the last two keys are pressed quickly one after other. Virtual sessions crtl-alt-F#useful if, say, netscape locks up session - can go somewhere else and login and kill that netscape process. Default screen is F7. |
|||||||||||||||
Copying files across from one machine to anotherTo copy files across remote machines, e.g., if have files
cvjw22ii01.tex and cvjw22ii01.ps on local
machine and want to put them on tersk:
scp cvjw22ii01.* kiwi@tersk.slac.stanford.edu:/afs/slac.stanford.edu/u/br/kiwi/Note: shire has more memory than tersk |
|||||||||||||||
SLAC Printer Queues
|
|||||||||||||||
... |
|||||||||||||||
Run files in the background with root, without having to setup display and without root window and to quit out of root when the process has finished running and to keep the output : myroot -q -b main.cc >& log.file & Finding BaBar personnel information at SLAC From a SLAC computer, e.g. tersk, person williams Cool way to use cat to make short filesUse cat > outfile to put standard input (i.e. what you type into the keyboard!!) into a file called outfile. Then tack on: << EOF , where the string "EOF" is a string which, when entered into the keyboard, exits the cat command and causes it to exit, writing everything verbatim that was entered before that string to the file outfile.cat >myjob <<EOF . /bfactory/profiles/group_sys.conf.sh srtpath 8.8.0c SunOS5 cd /export/home/roger/tau/workdir ./betarun ./mydata.tcl EOF |
|||||||||||||||
More stuffFrom Frank Jackson's pages:Jobs at SLAC bkill 0kills all your jobs srtglimpse [expr]searches for [expr] in all subdirectories of the parent of your release
To find a file (searches all paths beneath directory ./ ) find . -name [filename] -printTo display top 10 disk usage directories (excellent for finding rogue core files or other large one-offs) du | sort -n | tail -10lSeeing disk usage with just summaries of top-level directories: du -sk * To get a listing of all directories below '.': find ./ -type dTo add directories to your path (I have more notes on this that I must dig out): setenv PATH directorypath:$PATHTo find a file (searches all paths beneath directory ./ ) find . -name [filename] -print
Stopping
(not tried yet)
| |||||||||||||||
to code a fatal error message:
#include "ErrLogger/ErrLog.hh"Then ErrMsg(fatal) << "you are in trouble" << endmsg;- dies whenever get to the condition that this line is called, but gives this message on dying. | |||||||||||||||
Web wrapping:
To avoid wrapping: <!-- :WIT:NoWrap: -->as very first line of html file If files are already wrapped, unwrap first by doing: $BFROOT/bin/WEBwrap -rh yourfile.html Using a2ps: a2ps -2 -r -E -g -o outfile.ps infile.txtwhere: -r is landscape (-R for portrait) -2 is for two pages per sheet -E is pretty-print -g is for highlight level "heavy", else is "normal", use with pretty-print Unfortunately the Manchester and SLAC versions of a2ps don't support colour. Enscript is probably a better choice at SLAC, but is not available at Manchester: enscript --pretty-print=cpp --margins=45:30 --fancy-header=enscript --color MySuperProgram.cc -o MySuperProgram.ps | |||||||||||||||
From Manc: Copying slac-based nfs files to manc:
scp -rp kiwi@noric.slac.stanford.edu:/nfs/farm/babar/AWG25/tauuser_newpaw/* /nfs/hepdata2/jenny/.our farm page: /groups/slacb/farming.html | |||||||||||||||
To set permissions on AFS for THIS DIRECTORY and any subdirectories of
it MADE IN THE FUTURE to be readable by anyone with AFS access:
cd $HOME //to do this in my home directory fs setacl . system:anyuser rlCARE!! - this includes .globus if I subsequently make a .globus directory, and mail!!. If this is set up this way, and then make a new subdirectory, but want to make it inaccessible: fs setacl . system:anyuser none | |||||||||||||||
Is this oddly-tagged package older or newer than this other tag?Best way to check:listtag BetaSequences | head -20("head" does similar in unix to "tail", but shows top n lines) | |||||||||||||||
Make me a copy of the Babar Workbook, and preserve all the modification timescd ...../workbook; cd ..; tar -cvf - workbook | (cd somedir; tar -xfvp -)
More workbook stuff from an old file I hadHeader.inc: $BFROOT/www/.wit-root/Headers/www/Workbook Webtools: $BFROOT/www/computing/WebTeamPages/tools/bin DIRstamp - an executable unDIRstamp - makes webwrap not wrap that directory (file?) WEBwrap -h: (Mon 8:11) kiwi@shire01 $ WEBwrap -h WEBwrap wraps/unwraps BaBar navigation headers to your web page Usage: WEBwrap [-ah] [-rh] [-t] [-help] <file.html> -ah Add Header (replace existing header) -rh Remove Header -t Use timestamp of files to determine whether they need rewrapping -help Display this help file <file.html> the file you want to wrap At least one operation is required-force is also an option used in the web-wrapping files. |
|
All Rights Reserved |
Email: jenny@hep.man.ac.uk |