Answers to common questions,
regarding batch jobs, html, latex,
password, pdf, postscript, printers,
sas, Splus, spss, stata, top, thesis,
window managers, zip/uu.
Batch Jobs
chmod
Chmod stands for the
kind of accessibility that other have
to your files. It gives you a chance
to protect your files against outside
eyes.
For files:
Only I can read and write to it (text files, images):
Only I can read, write
to, and run it (programs, scripts):
I can read/write, everyone
can see it:
I can read/write, everyone
can see it and run it:
Apply permission xxx
to all files in the current directory:
For directories:
Only I can access files, use ``ls'' to list files
in the directory and create files:
Others can access files
(according to individual file permissions
above) and use ls to list files:
Others can access files.
A good mode for public_html directory
and subdirectories:
Miscellaneous:
Applies mode xxx to a directory and recursively
to all subdirectories. Generally not useful in
this manner since files and directories generally
require different permissions:
Add "write" permission
to file for me, the "user". (All the
numeric permissions also have shorthands
like this. See the man pages for more
details).
HTML
To ``publish'' a latex
file on your homepage:
(1) create a dvi file.
(2) type: ``dvipdfm myfile.dvi''
OR (but the following is a bit outdated and
may not work as well).
(1) create a postscript file of your latex
file by typing: ``dvips -o myfile.ps myfile''
(2) convert the postscript file into a pdf
file by typing: ``ps2pdf myfile.ps myfile.pdf''
Latex
To write a letter in Latex, save
the following file to your directory, letter.tex.
The margins are set in such a way
that if you would print on departmental
letterhead paper, it would fit exactly.
If you try to print and the printer
cuts part of your page off, then
you are probably using the old ``documentstyle''
command on the first line of your
latex document. Replace this by ``documentclass[11pt]{article}.''
For a simple set-up, save the file practice.tex in
your directory and copy the first
10 lines.
To view your latex
file on the computer, type
(Available on Aitken:)
To print 2 latex pages on 1 page, type
To create a postscript
file from your latex file, type
dvips -o myfile.ps myfile
To ``publish'' a latex file on your
homepage by converting it to a pdf
file:
(1) create a dvi file.
(2) type: ``dvipdfm myfile.dvi''
To include a picture
in your latex document, see the code
in the following file:
practice.tex.
Password
To change your password,
type:
and follow the instructions on the
screen.
PDF
PDF is the common
format of a lot of big text documents
on the Web. If you have a PDF file
(for instance, an article that you
wrote), then you can put it on your
homepage. People in the outside world
are much more likely to have a PDF
reader than a postscript reader.
To view a PDF file,
type:
To convert a postscript
file into a PDF file, type:
ps2pdf myfile.ps myfile.pdf
To ``publish'' a latex file on your
homepage by converting it to a pdf
file:
(1) create a dvi
file.
(2) type: ``dvipdfm myfile.dvi''
PhD Dissertation Information
The University has a site that
details the requirements of a PhD thesis.
It also contains links to LaTeX macros
that you should download so that your
thesis will meet the style guidelines
required by the University.
Postscript
To convert a dvi file
to a postscript file, type
dvips -o myfile.ps myfile
To view a postscript
file on your computer screen, type
To print 2 pages on
one page of a postscript file, type:
To print 4 pages on
one page of a postscript file, type:
mpage -4 -a myfile.ps | lpr
Printing
To view how many people
are printing already on a particular
printer, type: ``lpq'' or for a particular
printer:
To cancel your print
job. (1) Log in on the same machine
that you printed from. (2) View the
number of the job that you want to
cancel by the ``lpq'' command. (3)
If your jobnumber is 375, then type
``lprm 375'', or for a particular printer:
(Available on Aitken:)
To print 2 pages on one page of a latex
file, type:
To print 2 pages on
one page of any file, type:
To print 4 pages on
one page of any file, type:
SAS
For anyone who is
analyzing unbalanced designs in Splus,
make sure to do this first: (1) Type
inside Splus:
options(editor="pico")
fix(.First)
(2) this opens the
pico editor in which you will have
to type
function()
{
options(contrasts = c("contr.treatment", "contr.poly"))
options(editor="pico")
}
This is IMPORTANT because
the current defaults in Splus are nonsense.
If you want to test
for
Tukey 1df multiplicative interaction,
I have written a
little
Splus program. The S-plus manual
also provides a
program, but I have
reason to suspect that it is not correct.
How to run a batch
job in Splus: (1) create a file ``commands'',
that contains your Splus commands,
(2) type:
nohup Splus5 BATCH commands outfile
Now you can log out
and leave.
SPSS
Stata
Top
Typing ``top'' in
a window, will give you a list of all
the jobs that are running on that machine.
You can check for instance if there
is an old job of yours (often Netscape
that got inadvertently killed) that
is still running.
To kill an old job,
(1) type ``top'' and check the number
of your job, say, 375. (2) Kill this
job by typing ``kill -9 375''.
Window managers
Do you want to get
the most up to date window manager
with spending no energy? Type:
and then type from
now on (instead of ``X11'') the following
command when you start your Xwindows:
Zip and Uu
In order to make a
file more compact, the zip technique
is useful. Say that you have a bunch
of files in a directory and you want
to compress them all:
In order to get the
files back again, just do:
In order to send a
couple of files by email, it is easiest
first to compress them all to one archive
file:
tar cvf archive.tar file1 file2 file3 ...
Then compress the archive
file:
Then create a uuencode
file:
uuencode archive.tar.gz > archive.uu
Then send this file,
archive.uu, via email.
To retrieve the original files,
type (1) ``uudecode archive.uu'',
(2) ``gunzip archive.tar.gz'' (3)
``tar xvf archive.tar''.