Tutorial Exercises Week 7

  1. What characters are allowed in a FAT16 fle name? An ISO9660 (cdrom) file name? A Linux fle name? Use Google

  2. The touch is usually used to bring the file modification/access dates to now. How can you use it to set these times to any date? Does this have any implications for auditing file changes?

  3. How do you copy a directory and all of its files and subdirectories? Can you use this to backup a directory? Why is rsync a better way?

  4. What is the difference between the locate and which commands?

  5. The find command will start at a directory and recursively descend through all directories, executing a command on each one. What do the following do?

    1. find /home

    2. find /usr -name "*.sh"

    3. find /usr -type f

    4. find /home -exec grep -l date {} \;

  6. What is the command to find out how much space is free on a disk partition?

  7. What is the command to find out how much space is used by a directory and all of its subdirectories?

  8. If you add up the bytes used in the files in a directory, it is less than the size reported by the command in the last question. Why?