Using the Unix Operating System
Files, directories, commands, text editors
Lincoln Stein
Suggested Reading
Chapters 3-5 of Running Linux.
Lecture Notes
Workshop Problem Set
Problem #1
- Log into your machine. What is the full path to your home directory?
- What is the path to the home directory of user lstein?
- What is the path to the home directory of user guest?
- Locate the directory /net/share/unix1. How
v many files does it contain? How many directories?
Problem #2
Without using a text editor examine the contents of the file
cosmids1.txt.
- How many lines does this file contain?
- How many characters?
- What is the first line of this file?
- What are the last 3 lines?
The files cosmids1.txt, cosmids2.txt,
cosmids3.txt, and cosmids4.txt each contain lists of
predicted genes from the C. elegans genome.
- Using the grep program, find the
file(s) that contains the gene ZK103.4.
- Copy these four files into your home directory using one
command only.
- Rename cosmids1.txt to clones.txt.
- Create a new subdirectory named delete_me. Move all the
cosmids file into it.
- Use the chmod command to make this new subdirectory and its
contents read-only.
- Now delete delete_me and all its contents using the
recursive form of rm. What effect do the read-only file
permissions have on this?
Problem #3
Create a text file using the emacs, xemacs or vi
editor. Enter your name and address and save the file as
address.txt.
Problem #4
Using the man and/or apropos commands, find
the command(s) necessary to discover the amount of free disk space
available for your home directory. Run the command(s).
Genome Informatics
Lincoln D. Stein, lstein@cshl.org
Cold Spring Harbor Laboratory
Last modified: Thu Oct 9 19:34:38 EDT 2003