Rafael A. Irizarry
/is the lowest directory. Everything is on
/. To go there type
cdyou will go to your home directory.
cd ~. The tilde means ``home''. To go to my home dir type
ls, you see al directories and files in your system.
pwd. Your full path will be
/home/bst/student/loginname. You can always jump to another directory by typing the full path:
mkdirto make directories
chmod og+r filename
and for a directory
chmod og+rx filename
chmod -w filename
less /bin/ls. However other executables you can see,
You can easily make a program and run it. For example use this simple script to install a local version of R:
After downloading the source create a file called
the following content:
tar -xvzf R-1.9.1.tgz cd R-1.9.1 ./configure --prefix=/home/bst/faculty/ririzarr/R-1.9.1 make make install
I run this by typing
./installR-1.9.1 in my
directory. Here is an example of a command that will run R in batch
/bin/nice -19 R --no-save BATCH $1.R -o a.out &
You can also use
/bin/nice -19 R --no-save < $1.R \&> a.out &
Important: The & at the end runs this job on the background. It
is useful to learn the commands:
fg, bg, kill, top to
manipulate what is running in the background and foreground. It is
also important to learn about standard output and standard error. The
& and > in front of a.out says ``send error messages and output to
the file a.out''. & is std error and > is for output. The default is
Important: The nice in front of a command says to unix to let other jobs have priority over this one. This is important because the people using the system interactively should not be affected by a job that you are willing to wait hours for. In tsch you type
nice +19. You can also renice using
The shell is a program that runs on pretty much all unix/linux machines by default. It is hard to distinguish between what is unix and what is the shell, and you don't necessarily need to know the difference. All shells are similar and the important stuff is in all of them. But, you need to be aware that there are different shells.
My favorite is
bash. Currently, this is not the default on athena. So if
bash you need to ask Jiong to change it.
*Matches any string of characters including the null string.
?Matches any single character.
[...]Matches any one of the characters enclosed. A pair of characters separated by a minus will match any character lexically between the pair.
matches all names in the current directory beginning with one of the
letters a through z.
To define ``new commands'' use the aliases. See
~kbroman/.bashrc for an example.
lson your prompt, the shell knows it's a command so it needs to find the file to run it. There are many predefined places but the pwd is not one them. If you want to run an executable on your pwd you need to type
However you can change the places to look by changing your PATH
environment. We recommend having a directory called
bin in you
home dir where you store executables you create (for example your own
copy of R). To change the path in tcsh you can use:
setenv PATH /users/faculty/ririzarr/bin:/usr/dt/bin:/usr/local/bin:/bin :/usr/bin:/usr/sbin:/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/local/teTeX/bin/sp arc-sun-solaris2.8:/usr/local/office52/program:/usr/local/vni/bin:/usr/local/xg obi/src:/usr/local/SUNWspro/bin:/usr/ucb:/opt/SUNWdtpcv/bin:/export/home/mtaylo r/postgresql/bin
PATH=/users/faculty/ririzarr/bin:/usr/dt/bin:/usr/local/bin:/bin :/usr/bin:/usr/sbin:/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/local/teTeX/bin/sp arc-sun-solaris2.8:/usr/local/office52/program:/usr/local/vni/bin:/usr/local/xg obi/src:/usr/local/SUNWspro/bin:/usr/ucb:/opt/SUNWdtpcv/bin:/export/home/mtaylo r/postgresql/bin
Once you do this your unix will look for programs in your bin directory.
For others see:
MacOS X and Linux come with ssh and X windows so you can open X windows from home without any effort. With a fast connection it will seem as if you were at work.
For Microsoft windows you need to download and install ssh (there are two openSSH and commerical ssh, both free). If you want X capabilites you need another program. cygwin comes with a free version of X for msft windows. There are other products that are nicer but cost money.
http://www.biostat.jhsph.edu/~loginname. All you need to do is logon to www.biostat.jhsph.edu and create an
index.htmlfile in the directory
This document was generated using the LaTeX2HTML translator Version 2002 (1.62)
Copyright © 1993, 1994, 1995, 1996,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 0 unix.tex
The translation was initiated by Rafael A. Irizarry on 2004-09-02