|
Chapter 1: UNIX Basics Test Your Thinking |
![]() |
You are setting up some training files for new employees. The original files will be stored in a single location (/docs/training with the subdirectories tutorials/ and examples/. Beyond this, invent what you need to.
Since this is an important project, the system administrator will create new groups for you if necessary or modify the system startup files so certain environment variables are set for all new employees.
The original files need to be copied from /docs/training to some new location. You could give every user a directory under /docs/training or you could have them work in their home directories; I’ve seen both done.
In this case, I would suggest having employees copy the directories training and examples to their home directories. This means that the files will be easily available when a user logs in. A command such as
cp -R /docs/training/tutorials /docs/training/examples ~
will copy both directories into the user’s home directory.
This has the advantage of being simpler for the users. With one command, all of their files are in place. (If you had a system where there wasn’t a lot of disk space to hold home directories, this would be a bad choice.)
Since the permissions on a copied file or directory depend upon the user’s umask, the only requirement on the original files is that they be readable by everyone (mode 444).
cp -R $TUT/tutorials $TUT/examples ~
The third option seems the easiest for new users (the ones who most need a tutorial).
|
© 1999-2000 by Prentice-Hall, Inc. A Pearson Company Distance Learning at Prentice Hall Legal Notice |