Archive for October, 2006

Emacs – file coding system

October 11, 2006

In order to change the coding system for a file (i.e., DOS to Unix), you can use:

C-x RET f unix

Unix/Linux – ICS quota

October 11, 2006

To view your quota, use the following command on a Sun OS system:

quota -v

The command will not display the correct information on the Linux systems.

The get the amount of free space on a shared disk, use, for example:

df -h /extra/rvernica0

LaTeX – Customize page numbering

October 4, 2006

For changing the default, centered page numbering, use the fancyhdr package:

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyfoot[R]{\footnotesize Page \thepage\ of 2}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

This will print the page number on the right side of the footer, smaller font and in the format “Page % of 2″.

Unix/Linux – output the Nth line from a file

October 2, 2006

In order to output the Nth line from a file you can use:

more +N file | head -n 1