Chapter 5
1.
3.What happens when you give the following commands if the file named done already exists?
$ cp to_do done
$ mv to_do done
Either of the commands will overwrite done with the contents of to_do.
4. How can you find out which utilities are available on your system for editing files? Which utilities are available for editing on your system? apropos edit. man -k edit
8. What is the result of giving the which utility the name of a command that resides in a directory that is not in your search path? If if is not in my search path it will not show me the results for it.
10. Experiment by calling the file utility with the names of files /usr/bin. How many different types of files are there? Roughly 20.
Chapter 6 1. Is each of the following an absolute pathname, a relative pathname, or a simple pathname?
a. Milk_co
b. Correspond/business/milk_co
c. /home/alex
d. /home/alex/literature/promo
e. ..
f. letter.0610
IF it starts with / it is absolute value. If it does not contain a / or . it is a simple file.
2. List the commands you can use to Make your home directory the working directory Identify the working directory. Cd and pwd
3. If the working directory is /home/max with a subdirectory named literature, give three sets of commands you can use to create a subdirectory named classics under literature. Also give several sets of commands you can use to remove the classics directory and its contents.
mkdir ~/literature/classics, mkdir /home/max/literature/classics, mkdir ~max/literature/classics. To remove the classics directory and its contents rm -r /home/max/literature/classics
4. The df utility displays all mounted filesystems along with information about each. Use the df utility with the –h (human-readable) option to answer the following questions.
a. How many filesystems are mounted on your Linux system? 5
b. Which filesystem stores your home directory? /dev/sda1
c. Assuming your answer to exercise 4a is