Practice Cmds 1

Using the files under dirtree from the tar file downloaded (and best if you do it after competing Practice Paths 2), answer the following questions. Also describe the techniques and commands you used to determine the answers (so each questions has 2 answers):
  1. What file(s) tell you about your TAs?

  2. What file(s) tell you about your Instructors?

  3. Show the lines from all the files under dirtree/sdirb/ssdir3/sbdir3/sbd3/ that have a c.

  4. How many files in the dirtree/sdirb/ssdir4/sbdir4/sbd4/ directory contain a capital letter?

  5. What files in dirtree/sdirb/ssdir3/sbdir3/sbd3/ contain an f or an F. Give the command to run from the dirtree directory (in other words, cd to dirtree and run it from there).

  6. How many files are in /?

  7. What are the regular files (i.e. not directories) under dirtree?

  8. How many directories are under dirtree?

  9. What does this command give you (explain in English too):
    1. ls -R dirtree | grep -v : | sort -u


  10. Super tricky ... try it. What is does this command do? Note: it is on one line, even if HTML is formatting it on two.
    1. ls -R dirtree | sed -e 's/.*\///g' -e 's/://' | sort -u


Hint: For the complicated ones, try each part separately first. So do the first part, up to the pipe. Then add up to the next pipe, ...