Homework 1 -- grep and find

This assignment is due 13 February, 1996.

Problem 1

Show how to use egrep for search a file for lines that

  1. start with a period,
  2. start with two or more digits,
  3. contain one or more consecutive occurrences of the letter 'x' surrounded by spaces,
  4. contain the word "UNCA",
  5. contain the words "Unix" or "MS/DOS",
  6. contain the letter 'D' exactly three times,
  7. contain only digits and spaces,
  8. do not contain the letter 'D',
  9. end with a period, and
  10. end with the one or more occurrences of the letter 'a', preceded by the letter 'b'.

Problem 2

Show how to use the find program to

  1. print out the names of all files beneath your home directory containing the phrase "I luv Unix",
  2. print out the names of all files beneath your home directory that are larger than 500 blocks,
  3. print out the names of all files beneath your home directory that are not owned by you,
  4. execute the program "ls -lid" on all directories beneath your home directory, and
  5. print out the names of all files beneath your home directory that either are zero bytes in length or are older than one year.

Return to the CSCI 373 homework index
Return to the CSCI 373 index
Return to Dean Brock's home page
UNCA CSCI logo Return to the UNCA Computer Science home page