CS 141 Homework Assignment #4

In this homework, I show you the exact commands to type. Just follow the instructions.

step number your task what to type
1 Display the all the files in /classes/s2007fal/data using relative pathnames as shown. You should know why there is a period after the find command. Run these commands and see what you get.
cd /classes/s2007fal/data
find . 
2 Count the all the non-hidden files in /classes/s2007fal/data using relative pathnames as shown. Run these commands and see what you get.
cd /classes/s2007fal/data
find . | wc -l
3 Display the directory structure of /classes/s2007fal/data using relative pathnames. Run these commands and see what you get.
cd /classes/s2007fal/data
find . -type d
4 Display the directory structure of /classes/s2007fal/data using absolute pathnames. Run these commands and see what you get.
find /classes/s2007fal/data -type d
5 Save the directory structure of /classes/s2007fal/data using relative pathnames into file myproj in your home directory. Run these commands and see what you get.
cd
MYDIR=`pwd`
cd /classes/s2007fal/data
find . -type d > $MYDIR/myproj
cd
vi myproj
6 Next append the directory structure of /classes/s2007fal/data using abs pathnames onto the end of /tmp/xxx
cd
find /classes/s2007fal/data -type d >> myproj
7 Now view your file to make sure it contains both sets of output.
cd
vi myproj
8 While still in vi, Add your 3 char login as a new line at the top of the file myproj. Replace xxx in the instructions at the right with your 3 char login.
1G
ixxxENTER ESC
:wq
9 Print out your file and give it to the instructor in class
cd
lp -d p215 myproj