Homepage Research OfficeCam AstronomyRefs FriendsPages

Richard's handy computer tips

This page is mainly a useful lookup for me of computer gems I have found over the years. It saves me from guessing what I did.

Emacs

To set the key bindings in emacs,

Latex and pdf

To create pdf files from latex,

Xterms

To change the title of an x-term to a particular phrase use:

and so extending this, change the title to the current working directory in a tcsh shell, on a directory change:
alias cwdcmd 'echo "\033]0;`id -nu`@`hostname -s`: ${PWD}\007"'
or:
alias cd 'cd \!*; echo "\033]0;`id -nu`@`hostname -s`: ${PWD}\007"'

Awk

Replace old with new in awk

awk '{gsub("string_1", "new")}'

Compact flash cards

Laptop pcmcia readers

Compact flash cards are generally formatted with a vfat filesystem. This means that they can be mounted as standard drives on a linux operating system.

To mount the flash card, create a line in /etc/fstab with

/dev/hdc1	      /mnt/flash     vfat    noauto,user,fat=12	   0,0
where the first field (/dev/hdc1) corresponds to the first available device type (first hard drive = /dev/hda, second hard drive = /dev/hdb, etc). You can find out which drive is being assigned to the card by looking at /var/spool/messages after the card is inserted.

Create the directory /mnt/flash

Mount the card on the drive using mount /mnt/flash

Un-mount the filesystem before you remove the card, using umount /mnt/flash


Last Updated: 11 November 2002. Richard Ogley

Valid HTML 4.01 html 3.2