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
- start with a period,
- start with two or more digits,
- contain one or more consecutive occurrences of the letter
'x' surrounded by spaces,
- contain the word "UNCA",
- contain the words "Unix" or "MS/DOS",
- contain the letter 'D' exactly three times,
- contain only digits and spaces,
- do not contain the letter 'D',
- end with a period, and
- 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
- print out the names of all files beneath your home directory
containing the phrase "I luv Unix",
- print out the names of all files beneath your home directory
that are larger than 500 blocks,
- print out the names of all files beneath your home directory
that are not owned by you,
- execute the program "ls -lid" on all directories
beneath your home directory, and
- 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
Return to
the UNCA Computer Science
home page