Workshop

The Workshop summarizes the key terms you learned and poses some questions about the topics presented in this chapter. It also provides you with a preview of what you will learn in the next hour.

Key Terms

access permission The set of accesses (read, write, and execute) allowed for each of the three classes of users (owner, group, and everyone else) for each file or directory on the system.

block At its most fundamental, a block is like a sheet of information in the virtual notebook that represents the disk: A disk is typically composed of many tens, or hundreds, of thousands of blocks of information, each 512 bytes in size. You also might read the explanation of i-node in the glossary at the back of the book to learn more about how disks are structured in UNIX.

column-first order When you have a list of items that are listed in columns and span multiple lines, column-first order is a sorting strategy in which items are sorted so that the items are in alphabetical order down the first column and continuing at the top of the second column, then the third column, and so on. The alternative strategy is row-first order.

permissions strings The string that represents the access permissions.

row-first order In contrast to column-first order, this is when items are sorted in rows so that the first item of each column in a row is in alphabetical order from left to right, then the second line contains the next set of items, and so on.

Exercises

1:Try using the du command on different directories to see how much disk space each requires. If you encounter errors with file permissions, use ls -ld to list the permissions of the directory in question.
2:Why would you want all the different types of sorting alternatives available with ls? Can you think of situations in which each would be useful?
3:Use a combination of the ls -t and touch commands to create a few new files. Then update their modification times so that in a most recently modified listing of files, the first file you created shows up ahead of the second file you created.
4:Try using the du -s .. command from your home directory. Before you try it, however, what do you think will happen?
5:Use df and bc or dc to figure out the amounts of disk space used and available on your system.
6:Use the compress command to shrink a file in /tmp or your home directory. Use the -v flag to learn how much the file was compressed, and then restore the file to its original condition.

Preview of the Next Hour

The next hour is a bit easier. It offers further explanation of the various information given by the ls command and a discussion of file ownership, including how to change the owner and group of any file or directory. You will learn about the chmod command, which can change the specific set of permissions associated with any file or directory, and the umask command, which can control the modes that new files are given upon creation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset