105k views
5 votes
Will Adams (wadams) owns and maintains a database file in /home/wadams called contacts.db. The file holds contact information for perspective clients. Brenda Cassini (bcassini) and Vera Edwards (vedwards) want to access and add contact information to the file to share the data among the three users.

Your task in this lab is to create hard link files to /home/wadams/contacts.db as follows:

Use contacts_link as the hard link name

Create the file in the following directories:

/home/bcassini

/home/vedwards

__________________________________________________

This example needs to be done in a simulation viewer, but I am having a very hard time figuring out what to type to complete these tasks

User Derekyy
by
8.4k points

1 Answer

4 votes

Final answer:

To create hard links for contacts.db, use the ln command followed by the paths to the original file and the target location. Brenda Cassini's and Vera Edwards's directories will use the command to create contacts_link for their access.

Step-by-step explanation:

To create hard links in Linux for the contacts.db file, you will use the ln command which is used for linking files. To create a hard link called contacts_link in the directories /home/bcassini and /home/vedwards, here's what you should type:

For Brenda Cassini's directory:ln /home/wadams/contacts.db /home/bcassini/contacts_link

For Vera Edwards's directory:ln /home/wadams/contacts.db /home/vedwards/contacts_link

After running these commands, both Brenda Cassini and Vera Edwards will have access to the contacts.db file through the hard links you've created in their respective home directories. Remember, hard links do not work across different filesystems, so make sure that /home/wadams, /home/bcassini, and /home/vedwards are on the same filesystem.

User MrBar
by
7.8k points