Psy 422 - Assignment 1
Activate your account on shrike.depaul.edu
If you are currently a student, you have a shrike account already.
If you do not know how to log into your shrike account (if you do
not know your password) you must go to an ID Services office to
change your password and activate your account. Next week you will
be creating a web page on your shrike account, so you must activate
your account before next week.
Use Unix utilities to answer the following questions.
First telnet (or ssh) into your account on sheu-hp.psy.depaul.edu.
For each question, give (a) the answer and (b) the commands you
used to get the answer. (Hint: You can cut and paste the command
and its output into a file to print out and turn in. Hint#2:
remember that you can use the history list to see what commands
you have run, or to repeat them.)
- What is the largest file in your home directory?
Hint: man sort
- Extensive documentation for various packages can be found in
/usr/share/doc. There is a separate directory there for
each package. Which of these subdirectories contains
the largest pile of documentation (takes up the most disk
space)?
Hints:
- man du
- sort numerically
- There are over 100 directories - think about how
to list just a few that you are interested in
- Does the word "FUBAR" occur in all lower-case letters
anywhere in the source file of this web page? (The
web page that you are reading right now). If so,
how many lines contain at least one lower-case FUBAR?
Hints:
- Of course you could do this by using "view
source" in your browser window and then using "edit -
search." But I asked you to use Unix utilities, so
you'll have to figure out an additional method.
- Where is this file that you are reading located in
the Unix file system on the server?
- man grep
- Create a bash shell script called "fix-terminal-type" that
will change your terminal type to vt100 and export the
terminal type as an environment variable so that your
login window will display properly. It will only need
to be a few lines. You can use "my-first-bash-script"
as a model to help you figure out what to do.
Hint: pico might be easier to use than
vi
- How many words are there in the file /etc/hosts? (Count any
string of non-space characters as one word, and do not ignore case.
dog,
Dog, and
"dog
should all get counted as different words.)
Hints:
- Which non-hyphenated English word occurs with the
greatest frequency in the
file /etc/httpd/conf/httpd.conf, and how many times does it occur?
Hints:
- A non-hyphenated English word will contain only upper-
and lower-case letters
- You need to get each non-hyphenated English word
on a line by itself to make them easier to count
- man tr
- man uniq
- sort twice
- Really stuck? This link will take you to
more hints.
Try it yourself first, then follow the link if you
are stuck.
- How many times does that word occur if you ignore case -
in other words
if you count uppercase and lowercase together?
Hint:
- Compare your pseudo-code for this problem to what you did
in the previous problem. What step(s) do you need to add?
- Check out the options for sort
and uniq
Readings for Next Week
- Chaper 1 (Intro to Computers and the Internet)
- Chapter 4 (Intro to XHTML)