Exercise Sheet Five
- Use telnet to request a web page from the web server www.doc.ic.ac.uk by connecting to port 80, as shown in the notes.
- Use ping to find the round-trip delay to www.altavista.com.
- Use traceroute to see the network route taken to www.altavista.com (which is in the USA). Can you tell which cities your network traffic passes through?
- Use ftp to connect to the FTP site sunsite.doc.ic.ac.uk. 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?
- Use wget to get a copy of the web page http://www.doc.ic.ac.uk/index.html. 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?
- Use finger or who to get a list of users on the machine.
- Use write to send them a message. To stop people from sending you messages, type "mesg n". To reenable messages, type "mesg y".
- Try use talk to send a message to someone (N.B. this may not work).
- List all your processes, using sed to substitute "me" for your username.
- Use who, awk, sort and uniq to print out a sorted list of the logins of active users.
- Use awk on /etc/passwd to produce a list of users and their login shells.
- Write an awk script that prints out all lines in a file except for the first two.
- 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".
- Create a file called hello.c containing the simple "hello world" program in the notes. Create an appropriate makefile for compiling it. Run make.
- Use man -k to find a suitable utility for viewing postscript files.
(BACK TO COURSE CONTENTS)