.ce SUGGESTED EXERCISES .np Login .np Give yourself a password .np Logout and login again .np Print a calendar for your birth-year .np Print a calendar for December 1995 .np What day of the week were you born? .np How many days were in the month September 1752? Be sure to do this one, it's fun. .np Try echoing some messages. .np Find out the time and date. .np Change the erase key to '='. Try hitting . Change erase back to .np Create a file containing a calendar. (Inspect it, using cat ) Add a line commenting on the calendar. Inspect the file again. .np Create a file containing the calendar for the years 1985, 1986 and 1987 Inspect this file using 'more'. .np Mail a letter to your neighbor. Use the password file to get the login name. .np Read your mail. .np Use grep to find your name in the /etc/passwd file. .np Find out who is on the system. .np Talk to your neighbor (by computer) .np Read up on cat. Use man to learn what all the different flags to cat mean. Try them. .np Use cat to create a file. Use cat to combine two files. .np Use apropos to see if there is any way to get phone information. Try it. .np By now you have a few files. Try different ways of listing them. (ls, ls -a, ls -l,ls [a-z]*, etc. Try listing only some of them. .np Rename some of your files. .np Copy a file. Remove the old one. (Use ls to verify the copying and the removal.) .np A. Copy /usr/local/skel/teach-vi to your directory. (cp /usr/local/skel/teach-vi . ) The '.' IS part of the command. Then use vi to edit teach-vi. (vi teach-vi) Try the stuff in teach-vi. .br B. This is an alternative to A. (above) Use vi to edit a file you've created. Try the commands on the summary sheet. .np Use ex on any file. Try some of the powerful commands. (E.g. Try inserting a space before any character which is not a space.) .np Change into the parent directory of your "home". Look around. Do the same for /usr/bin. .np Create a directory. Copy some files into the new directory. Change to the new directory. Create some files in there. Change back to your home directory and try some different 'ls' commands. .np Try pwd in different directories. Try cd and cd .. . Create and remove a directory. Try putting a file into the directory first. .np Change the protection code so that your neighbor can read one of your files. Do this inside a newly made directory. .np Use a pipe to write a one line command to find out if your neighbor is logged on. This command shouild have only one line of output .np Use fmt from inside of vi. .np Use "head /etc/passwd > shortpw" to get part of the passwd file into your own account. Use sort to sort shortpw in various ways. (Note that the field separator is ":". .np Add a command or two to your .login file. Add an alias to your .cshrc file. Login again and try them. .np Start editing a file. Use to stop it. Try some other commands. Restart the editing job. .np Use some features of the history mechanism to repeat commands. .np Run and compile a fortran program. .np Make a small Makefile. Compile a fortran (or C or ...) program using a Makefile. .np Combine head and tail using pipes to see the 10th 11th and 12th lines of a file. .np Try the file command on various groups of files. .np How many files are in /usr/bin ? .np Print out the names of the five largest files in /etc