26Sep14
Unit 2 Chapter 5 p.182 1,3,4,8,10
Unit 2 Chapter 6 p. 221 1,2,3,4,6
1) What commands can you use to determine who is logged in on a specific terminal? who, whoami
3) What happens if you give the following commands when the file ‘done’ already exists?
$cp to_do done
‘done’ is overwritten with contents of ‘to_do’
$ mv to_do done
‘done’ is overwritten with contents of ‘to_do’
‘to_do’ no longer exists after the command
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?
You can use the which. whereis, and locate utilities to search for files. VIM
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? command not found
10) Experiment by calling the ‘file’ utility with names of files in /usr/bin. How many different types of files can you find there? file /usr/bin/* | awk –F: ‘{print $2}’ | sort –u
9 different file types
p.221 (1,2,3,4,6)
1) Is each of the following an absolute pathname, a relative pathname, or a simple filename?
a) milk_co simple filename
b) correspond/business/milk_co relative pathname
c) /home/alex absolute pathname
d) /home/alex/literature/promo/ absolute pathname
e) .. relative pathname
f) letter.0210 simple filename
2) List the commands you can use to perform these functions. cd: and pwd
3) If 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. a=mkdir /home/max/literature/classics, mkdir ~max/literature/classics, or mkdir
~/literature/classics
b=rmdir /home/max/literature/classics, rmdir ~max/literature/classics, rmdir ~/literature
/classics, rm –r /home/max/literature classics.
4) The df utility displays all mounted