Introduction to UNIX: 
Exercise Sheet Five

  1. Use telnet to request a web page from the web server by connecting to port 80, as shown in the notes.
  2. Use ping to find the round-trip delay to
  3. Use traceroute to see the network route taken to (which is in the USA). Can you tell which cities your network traffic passes through?
  4. Use ftp to connect to the FTP site Obtain the latest version of the package units (in the form of a .tar.gz file) from the directory packages/gnu/units. Decompress and unarchive the .tar.gz file. Type configure and then make. Run the executable program that is produced as "./units -f units.dat". What does the program do? If you were the system administrator, what would you have to do to install the package for everyone to use?
  5. Use wget to get a copy of the web page Have a look at the contents of the file. Can you use sed to strip out the HTML tags (text enclosed in < and >) to leave you with just plain text?
  6. Use finger or who to get a list of users on the machine.
  7. Use write to send them a message. To stop people from sending you messages, type "mesg n". To reenable messages, type "mesg y".
  8. Try use talk to send a message to someone (N.B. this may not work).
  9. List all your processes, using sed to substitute "me" for your username.
  10. Use who, awk, sort and uniq to print out a sorted list of the logins of active users.
  11. Use awk on /etc/passwd to produce a list of users and their login shells.
  12. Write an awk script that prints out all lines in a file except for the first two.
  13. Modify the awk script in the notes so that it doesn't increase the number of players used to calculate the average if the manner of dismissal is "not-out".
  14. Create a file called hello.c containing the simple "hello world" program in the notes. Create an appropriate makefile for compiling it. Run make.
  15. Use man -k to find a suitable utility for viewing postscript files.


© September 2001 William Knottenbelt (