[ pure ] [ simple ] [ visual ]

Main Menu

[ Me ] [ Studies ] [ Projects ] [ Links ] [ About ]

Misc Projects

[ Misc Projects ] [ Colour Game ] [ Othello ]

This page contains stuff related to the HUT's computer environment. It's a mess but that's better than nothing.

Printing multiple pages on one page

mpage -2 -f -bA4 -o -PmyPrinter myFile.ps

Where -2 means two pages on a side, -f turns on line folding, -bA4 selects A4 as the paper type, -o toggles off the ugly boxes around the subpages, -P defines the printer and finally comes the the name of the file to be printed. Consult man pages for more information.

There is also another way to do the trick.

psnup -pa4 -c -n2 myInputFile.ps myOutputFile.ps

Where -pa4 selects the paper size, -c sets the column-major layout, -n2 defines two pages to be printed on one physical page and then there are the file names.

Sometimes the pdf or ps files just happen to be upsidedown. Normally this doesn't matter since one can turn the paper around after printing it or use ghostview's options to do the same. However, if many pages are printed on a single sheet, this becomes a problem. In the following code the first command converts the pdf files into ps files, the second line turns every page upsidedown and the final command prints everything out - upsidedown, but it really doesn't matter at this point...

pdf2ps myFile.pdf myFile.ps
pstops '1:0U(1w,1h)' -q myFile.ps myUpsidedown.ps
psnup -pa4 -n8 -l -q -m2cm myUpsidedown.ps myMultiPage.ps

The option -n8 has to be written -n 8 on some systems. See also Postscript-FAQ.

Using PGP (Pretty Good Privacy) to encrypt and sign a file

pgpe -asr "receiversUserID" -u "myUserID" -o myFile.asc myFile.txt

See the man pages to just type pgp -h.

Sending email from the command prompt

mailx -s "mySubject" receivers@address.comes.here < myText

Where -s stands for subject. See man pages.

Setting environment variables

setenv MYVARIABLE ~/my/first/folder/
setenv MYVARIABLE ~/my/second/foleder/:"$MYVARIABLE"

The first command sets the enviroment variable MYVARIABLE to point to the specified folder. The second line concatenates the new definition with the existing one.

When the console freaks out (they usually do)

After logging into the server machine (from another console...) the following commands should do the trick:

ps -f -u username
kill pid
kill -HUP pid

The first command displays user's processes, the second kills the bastard and the third gets rid of even the die hards.


[ Back to top ] [ Next style ]
Last compiled 1:09:51 18.2.2002.