Exercise:You have http://imgur.com/a/pYoVx
this image.Circles are files and the rectangle are archives.The files (5 ) , (8 ) ,(11 ) ,(25 ) are home directories the users bob,alice,studin,cat respectively.(he means (5) file is home directory from user bob,(8) file is home directory alice, (11) file is home directory studin and the file (25) is home directory cat ).''Near'' in every object there is one number which number isnt part of that name.
You must mark which one is ''right and absolute path" ,"right and relative path","false path".
In every case are given different conditions (who user are and which we have for current directory)
1) .home/bob/file1 (we are bob with cwd the file 11)
2) /~/ ( we are bob with cwd the file 8)
3) ~bob/file2 (we are studin with cwd the file 17)
4) $ΗΟΜΕ/../guests/studin/d1 (we are bob with cwd the file 5)
5).studin/d1/file2 (we are studin with cwd the file 24)
6)/../bob/file1 (we are bob with cwd the file 8)
7)etc/passwd (we are studin with cwd he file 2)
8)cd/home/bob/file1 (we are bob with cwd the file 1)
9)~/d1/file1 (we are bob with cwd the file 2)
10) ../guests/studin/d1/file2 (we are bob with cwd the file 5)
my answers :
1)right and absolute path.Explain : . means that i am in current so it start / (slash).What is start with /(slash) is absolute path.
2)right and absolute path.Explain: start with / (slash) after ~ (that means the user home directory of a user) and it ends with /(slash)
3) right and relative path.Explain :start ~bob tha mean i am user bob
4)false path.It cant be start with $
5)right and relative path.Explain : . means that i am in studin
6)right and absolute path.explain : start with / and after .. that means the next file
7)right and relative path
8)false path.Exaplain : I dont beleive it start with cd( cd file1 and it goes us to file1 ,but here it has cd/home it think it doesnt move me there).
9)right and relative path.Explain : ~ refers to studin after there is a / (slash) ater a file d1 and /(slash) another file named file1
10) right and absolute.Explain:i am not sure about this two .. as far as i know it goes from tree one ''step lets say file down''.