General Unix stuff: cd - --- "undo" on changing directories: xkill kills the window (but not the process) kill -9 kills the process. Man pages which are not the default ones are viewed like this: man socket -8 netstat gives all the sockets open on the machine file gives the file type uname -a gives the information about the machine (you are on) detex strips out LaTeX tags, which is useful for word counting (wc). strings -- gives the ascii strings from a binary file. xargs is like map -- you pass it a sequence of stuff separated by newlines and it applies the command to each line. tgif is a utility for drawing diagrams which apparently has "connection mode" like in PowerPoint. Ctrl^S stops commands from reaching the shell (very easy to accidently press if you think you are in Emacs) Ctrl^Q restarts the flow of commands again. Ctrl^Z makes the current process a zombie. Use fg and bg (foreground and background) to bring it back to life. lprm -- removes print jobs. Has the same arguments as lpr. lpq x -- gives a list of printers, their properties and their locations rpm: rpm -q -a lists all the packages installed on your system. tar -xjvf uncompresses .bz2 files. Emacs Rectangle cuts: Ctrl-x r k Cut Ctrl-x r y Paste These are absolutely wonderful if you want to insert >> before each line or something like that. Ctrl-x r t Insert in rectangle Rectangle cuts to register: Ctrl-x r r Ctrl-x r g Jump to register: Ctrl x r j < Replace regular expressions: M-x replace-regexp Particularly useful are: ^ -- beginning of line $ -- end of line When replacing strange strings: M-x replace-string now Ctrl-Q means "quote the next character" at which point you can hit Ctrl-M to get the DOS \r and then replace it. Ctrl-j to get the unix newline Anyway, Ctrl-q is the important one to treat the next keypress as a quote. So, to search and replace new lines: Ctrl-Shift-4 Ctrl-Q Ctrl-j (which is the same as Enter) Enter .... toggle-case-fold-search C/C++ #if 0 #endif CL setup: rquota rdesktop -F waterloo otpw-gen | lpr ssh ssh-relay1.cl.cam.ac.uk Exmh: Ctrl-Tab for looking up the email address. ssh option if the sysadmins are *really* paranoid -oStrictHostKeyChecking=no mh: when replying to a message, the original message lives in the @ file in the home directory. LaTeX pdflatex dvipdf (not installed in the CL) tex makebst -- bibliography styles.... \texttt{} Cross-referencing \label \ref{} Citations: \cite{} Lists of things: \begin{itemize} \item \end{itemize} \begin{description} \item[Item heading printed in bold] Item text \end{description} URL's: \usepackage{url} \url \usepackage{latexsym} --for symbols. Figures: \usepackage[dvips]{graphicx} ... \begin{figure} \centering Purple\psfrag{A}[cc][cc]{$\vdots$} Purple\psfrag{B}[cc][cc]{$N$} Purple\psfrag{F}[cc][cc]{$$} Purple\psfrag{D}[cl][cc]{$N$} Purple\psfrag{C}[cl][cc]{$\vdots$} Purple\psfrag{E}[cl][cc]{$n$} \includegraphics[height=4cm]{sys.eps} \caption{System description} \label{f1} \end{figure} PSfrag? At the end... \bibliography{Anon_p2p} Tables: \begin{tabular}{lll} as & bs & cs \\ \end{tabular} Tables with lines: Purple\begin{Bluecenter} Purple\begin{Bluetabular}{|l|l|} Purple\hline $n$ & mix threshold Red\\ Purple\hline $p$ & pool Red\\ Purple\hline $t$ & period Red\\ Purple\hline $P(n)$ & the probability of a message being forwarded during the current round Red\\ Purple\hline Purple\end{Bluetabular} Purple\end{Bluecenter} Sectioning... \paragraph*{} \subsubsection*{} \mbox{} -- text box within math mode \\ -- newline \( \) -- big brackets. \displaystyle -- makes the superscripts ad subscripts on the Sigma (summation) come out above and below the Sigma rather than as superscripts and subscripts. If this happens within an array, it only works for that cell in the array! Very confusing. Fonts: \sf, \bf, etc -- see page 32 of Lotel'nikov & Chebotaev. BOXES!!! \colorbox[gray]{0.8}{$(\tau,(a,(m,p,c)));(\tau,(b,(m,q,c')));$} Some LaTex Macros: \let\oldsum\sum \renewcommand{\sum}{\oldsum\limits} \newtheorem{teo}{Theorem} \newcommand{\timestamp}{2002-09 -- Time-stamp: <<2002-12-10 10:52:01 aas23>} (The latter needs some emacs magic as well. Need to find out what that is) na\"{DimGray\i}ve Packages: \usepackage{url} \usepackage{amsmath} gives \text{} \usepackage{amssymb} \usepackage{latexsym} \usepackage{parskip} \usepackage{psfrag} Finding the bounding box from an excel .eps output. gs -sDEVICE=bbox graph1.eps lpr -Tgsps does some magic