Datasheet

Task 1.3: Manage Links
17
As with many other file-manipulation commands, chmod accepts a -R option to operate
recursively on an entire directory tree.
Criteria for Completion
To complete this task, you should have a new directory, /home/project7, which contains a
number of files copied from /etc. The copied files should be owned by an ordinary user on
your system (fred in the examples).
Task 1.3: Manage Links
Native Linux filesystems have always supported a feature known as links. A link is a way to
refer to a file in one location from another location or to use multiple names for a single file.
Linux supports two types of links, which are described shortly. They’re created and managed
with the ln command. In this task, you’ll learn how to create and manage links.
Scenario
To make it easier for users to access the files in the directory you created in Task 1.2, you want
to create links to some of the files it contains. To do so, you’ll create both types of links, and
in the process you’ll learn how to remove and manage links.
Scope of Task
Links are not difficult to manage, although the differences between the two types of links
Linux supports can be confusing to new Linux users and administrators. This task will step
you through the two types of links and provide tips on how to manage them.
Duration
This task should take about half an hour to complete. Once you’ve learned the task, you
should be able to perform similar tasks in just a few minutes.
chmod o-rwx bigprogram rwxrwxr-x rwxrwx---
chmod g=u report.tex rw-r--r-- rw-rw-r--
chmod g-w,o-rw report.tex rw-rw-rw- rw-r-----
TABLE 1.3 Examples of Symbolic Permissions with chmod (continued)
Command Initial Permissions End Permissions
83484.book Page 17 Monday, September 18, 2006 8:58 AM