Networking Chapter 2 Homework Then They Practice Using Thecd Commandproject 26for This Project Students Use The

subject Type Homework Help
subject Pages 7
subject Words 2667
subject Authors Michael Palmer

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
1
Guide to UNIX Using Linux Fourth Edition
Chapter 2 Solutions
Answers to the Chapter 2 Review Questions
1. Your company is discussing plans to migrate desktop and laptop users to Linux. One concern raised by
the users is whether Linux supports the use of CDs and DVDs for both work files and for listening to
music. Which of the following is an appropriate answer?
2. You receive a message that you’ve successfully backed up hda2 on your Linux system. What is hda2?
3. You have purchased a special monitor for your computer and the instructions tell you to make a minor
modification to the inittab file. Where would you locate this file on a typical Linux system?
4. You’re frantically trying to get ready for a meeting and want to access a file in your home directory,
but you are currently working in a public directory open to all users. What command can you enter to
instantly go to your home directory?
5. Your new colleague asks which partitions vendors recommend setting up on a Linux system. Which of
the following partitions do you include in your response? (Choose all that apply.)
6. You have mounted a remote network drive and now you want to unmount that drive. Which of the
following commands do you use? (Choose all that apply.)
7. When you connect a printer via a USB port on your Linux computer, which type of device special file
is used to handle streams of data sent to and from the printer?
8. Some of the users in your company create and delete so many files that they have problems with
fragmented disks. Which of the following new features in the ext4 file system help to reduce
fragmentation problems?
9. In UNIX and Linux systems, what source of extra memory space is used when working on tasks and
files that exceed the RAM capacity on chips in the computer?
10. You are always scheduled for two or three meetings each day and need to keep an eye on the time.
What PS1 variable parameter can you set in order to have your command prompt display the current
time?
11. You have been working in several directories for the past hour and right now you don’t remember
which directory you’re in currently. What command can you use to show your current working
directory?
page-pf2
12. A member of your department has given you permissions to view the contents of the accounting
directory under his home directory. The name of his home directory is bramirez. Which of the
following commands should you use to display the contents of the accounting directory?
13. It’s late and you have been working all day to finish a report. Before you go home you want to copy
several files including your report file. What copy command should you use to ensure that you don’t
inadvertently copy an older report file over the newer report file you’ve been working on for the last
four hours?
14. Which of the following are file systems supported by UNIX and Linux operating systems? (Choose all
that apply.)
15. You are helping a friend who is new to Linux. You want to determine which entries under her home
directory are directories instead of files. When you perform a long listing of the home directory’s
contents, what do you use to distinguish a directory from a file?
16. Your boss is planning to do some house cleaning by deleting several old files. However, she mentions
that she doesn’t want to delete an important file inadvertently. What command can she use so that she
is prompted to make sure she wants to delete a particular file?
17. You are curious about the error and system logs kept by your operating system. In what main directory
under the root (/) would you most likely find these logs?
18. A friend of yours is trying to make more space on his hard disk drive and is considering deleting the
/lib directory because he has heard it mostly contains games that he doesn’t use. What is your
recommendation?
19. Which of the following are permissions that can be granted to a file? (Choose all that apply.)
20. Which of the following commands enable(s) you to set permissions on a directory after you create it?
(Choose all that apply.)
21. You have created many notes to yourself that end in .txt. Which of the following commands enables
you to list all of the .txt files in your home directory while you are in the Bash shell?
22. Short answer: Where is virtual memory located?
23. Short answer: When you see the permissions rwx--x--x associated with a file, what permissions are
granted?
page-pf3
3
24. Short answer: Your boss wants to use the command to view hidden files and also wants to know how
to find them among other files. What do you tell her?
25. Short answer: You have many files that begin with the word “account” and that end with two digits to
designate a year, such as account00, account 01, and so on. What is the command that enables you to
view all of these files that start with account?
Hands-On Projects Tips and Solutions for Chapter 2
Project 2-1
In this project, students determine the file systems that can be mounted in a Linux system.
In Step 2, the file systems are likely to include some or any of the following (note that there are many
more than discussed in the text, because the text is intended to cover the basic options and not all
possibilities, including those for devices):
adfs
affs
autofs
coda
coherent
cramfs
devpts
efs
ext
ext2
ext3
hfs
hpfs
page-pf4
4
In Step 3, the file systems that students see will depend on how their system is set up. Typical
examples of mounted file systems are:
ext3
proc
usbdevfs (for usb devices)
devpts (for devices)
tmpfs (for temporary storage)
Project 2-2
This project enables students to mount and unmount a CD. They will need access to the root account
and a CD that can be mounted and read.
In Step 6 of the first set of steps, to mount a floppy (depending on the floppy device), students would
use the following command after inserting the floppy disk:
Project 2-3
Students first view the contents of the PS1 variable and then they configure it to show the day of the
week, date, and time, then show the current working directory,, and finally to show the full path to
their home directory.
Project 2-4
.
For this project, students practice using the pwd command.
In Step 2, students should report their working directory, such as their home directory.
Project 2-5
Students begin by changing the prompt to display their working directory. Then they practice using the
cd command.
Project 2-6
page-pf5
5
In Step 1 of the third set of steps, students display the contents of the /dev file. They should note that a
“c” in the first position of the first column indicates a character special file.
Project 2-9
In this project, students practice using the * and ? wildcards with the ls command.
Project 2-10
Students create two directories and a file in each directory for this project, which enables them to use
Discovery Exercises
1. Use the ls command to list the contents of the root file system directory (/) on your system.
2. Use the ls -l command to view the contents of the root file system directory (/).
3. Determine the inode value for the /etc directory.
4. Make /etc your current working directory and then go back to your home directory
5. Make the root file system directory your current working directory. What command can you use to
verify that you are in the root file system directory? Return to your home directory.
6. The file info.txt is in the help directory, which is a subdirectory of the /dev directory. What is the
absolute path to info.txt?.
7. Change to the /dev directory. Next, access your home directory using a tilde (~) in the command
that you employ.
page-pf6
6
8. Determine whether there are any hidden files in the /home directory.
9. Make a directory under your home directory called documents. Next make a directory under the
documents directory called spreadsheets. What is the absolute path for the spreadsheets directory?
10. Make certain you are in your home directory. Use a relative path to make your new documents
directory the current working directory. Next, use a relative path to make the spreadsheets
directory your current working directory. Now, use a command with dots in it to make the
documents directory your current working directory.
11. With your home directory as your current directory, use the command to remove read, write, and
execute permissions from group and others for the spreadsheets directory. Next, verify that your
change has taken place.
12. Use the cat command to create a two-line file in your home directory called datainfo. On the first
line enter 144 and on the second line enter 288. After the file is created, copy it from your home
directory to the spreadsheets directory you created.
13. Determine the default permissions on the datainfo file your created. Next, set the permissions on
the datainfo file so that the owner, group, and others can read and execute the file (otherwise leave
the default settings as is).
14. Append the current month’s calendar to the datainfo file that is in your home directory. Next copy
your changed datainfo file over the older datainfo file in the spreadsheets directory, but use the
copy option that prompts you before you overwrite the file in the spreadsheets directory. Check
the contents of the datainfo file in the spreadsheets directory to make certain your copy was
successful.
15. Make the spreadsheets directory your working directory. Make copies of the datainfo file in the
spreadsheets directory, so that one copy is named myinfo and one is named datadata. Next, use a
wildcard character to list all files that start with “data.” Use a wildcard character to list all files that
page-pf7
end with “info.” Use a wildcard character combination to list all files that have “ata” as the
second, third, and fourth characters.
16. Make certain you are in your home directory. Change your command prompt so that it shows your
current working directory with an exclamation point, such as mydirectory! Change to the
spreadsheets and then to the documents directory and notice how the prompt changes
17. Change to your home directory. Use the rmdir command to delete the spreadsheets directory.
What happens?
18. Delete the datainfo files in both your home directory and in the spreadsheets directory. Also,
delete the myinfo and datadata files in the spreadsheets directory.
19. Change to your home directory. Delete the spreadsheets directory and then delete the documents
directory.
20. Create a directory called secure under your home directory. Next, using the octal permission
format, set security on the secure directory so that you have all permissions and no one else has
any permissions.

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.