Help with 2 question on a test

idanbu

New Member
Joined
Apr 24, 2020
Messages
3
Reaction score
0
Credits
0
hi all
im new here, and generally in linux
i want to be sure and understand and not just to pass the test so
can you explain why im wrong in this 2 questions here?

wrong1.PNG



wrong2.PNG
 


'..' is the last folder
For example,
/home/ken/.. == /home/

Therefore,
/home/user/download/.. == /home/user
/home/user/download/../documents == /home/user/documents

I don't know about the 2nd question
 
'..' is the last folder
For example,
/home/ken/.. == /home/

Therefore,
/home/user/download/.. == /home/user
/home/user/download/../documents == /home/user/documents

I don't know about the 2nd question

if i understood you well it means the i pressed the right answer?
 
The first question you got correct, ../ tells the computer to go back down 1 directory, /Documents tells the computer to then go up 1 directory to Documents.

For the second question, /etc/passwd shows a list of users, their UID/GID, home directory and shell. /etc/shadow shows the users and their encrypted passwords.
 
It looks like the test itself is wrong.
From what I can see, your answers are correct.

The correct answer for the first question is the one you have selected.
/home/user/Documents

You're also correct in the second question.
The encrypted password is NOT stored in /etc/passwd, it's in /etc/shadow. So that would be an incorrect answer.

I'd have a word with whoever set that test because they have the wrong answers marked as correct there.
 
bash-5.0$ pwd
/home/andrew
bash-5.0$ cd /home/andrew/Downloads
bash-5.0$ pwd
/home/andrew/Downloads
bash-5.0$ ls ../Documents/
test.txt
bash-5.0$
 
You know what they say ..."if you can't do it , and thus not get employed teach it "!

Maybe the teacher is a Windows user ?
 

Members online


Top