Chapter Review


[Page 164 (continued)]

Checklist

In this chapter, I described utilities that:

  • filter files

  • sort files

  • compare files

  • archive files

  • find files

  • schedule commands

  • support programmable text processing

  • create hard and soft links

  • substitute users

  • check for mail

  • transform files


  • [Page 165]
  • look at raw file contents

  • mount file systems

  • prepare documents

  • allow you to write Perl scripts

Quiz

1.

Under what circumstances would you archive files using tar?

2.

How would you convert the contents of a file to uppercase?

3.

What is the difference between cmp and diff?

4.

Describe what it means to "mount" a file system.

5.

Which process serves the crontab system?

6.

What additional functionality does an extended regular expression have?

7.

What are the main differences between sed and gawk?

8.

When do you need the su command?

9.

What argument causes gzip to write the compressed file to stdout rather than a file?

10.

Under what circumstances would you use a symbolic link instead of a hard link?

11.

What are the drawbacks of using a symbolic link?

12.

What are some ways that Perl makes script programming easier than conventional shell scripts?

Exercises

1.

Ask your system administrator (or someone knowledgeable) to demonstrate the use of tar to produce a backup tape of your files. [level: easy]

2.

Explain how you would use crontab to schedule a script that finds and removes your old temporary files in /tmp at the start of each day. [level: medium]

Projects

1.

Write a command pipeline to find files in a directory hierarchy (e.g. your home directory) that have not been accessed for 30 days and compress them. [level: easy]

2.

Modify the loan Perl script so that you can pass a list of payments to it rather than using the same payment value for every month. [level: medium]




Linux for Programmers and Users
Linux for Programmers and Users
ISBN: 0131857487
EAN: 2147483647
Year: 2007
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net