UNC
School of Information and Library Science
INLS760 – Web Databases, Spring 2011
INLS 760

Main Page

Announcements

Calendar/Notes

Assignments

Links

Course Policies

Grades

In-Class Exercise #1

Unix Exercises

Do the following exercises in your ruby.ils.unc.edu account.

  1. Create a directory named "ex1" and copy the following two files into it. Try using a wildcard character to copy both files at once.
    		   /htdocs/courses/2011_spring/inls760_001/ex1/sample1.txt
    		   /htdocs/courses/2011_spring/inls760_001/ex1/sample2.txt
    		
  2. Read the man page for the Unix uniq command. Use the sort and uniq commands along with the pipe operator to write a one-line statement that will list all the lines that appear in both sample1.txt and sample2.txt (i.e. the intersection of the two files).
  3. Do the same as above, execpt instead of showing the intersection of the two files on the screen, write the lines out to a file called overlap.txt
  4. Set the permissions on the overlap.txt file so that you can read and write the file, users in your group can read the file, and all other users of the system cannot read or write the file. No other permissions should be set.