| |
Shell File Patterns
Start in this directory: ~ian/lab2
Answer these questions. Give the Unix command lines you used to arrive at your answers.
(Cut and paste will work nicely to show your commands and their output.)
- This directory contains a bunch of things that are all the same size and have similar
names. Which one is a directory? How can you tell?
- What is the shortest command you can type to enter the sub-directory that is under the lab2
directory?
Go into the sub-directory that is under the directory ~ian/lab2 and
answer these questions:
- There are more than 50 files and/or directories in this sub-directory.
Use Unix commands to count exactly how many.
- How many of the entries here are directories?
Use Unix commands to count exactly how many.
- How many files are compressed files?
Use Unix commands to count exactly how many.
- The "sum" command ("man sum")
produces a number based on the content of a file. While not guaranteed to be true for
every file, the number is always the same if the file content is the
same, and usually different if the file content is different. (Rarely,
different content can produce the same number.)
Many of the files in this directory
contain the same content. Use Unix commands to find out which files are the same and which
are different. How many different files are there, really? (You may need to uncompress
some files to answer this question.)
Use a Unix command to locate the differences among the files that are different.
Cut-and-paste just the differences.
|