Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Suppose the home directory for a user is \'/home/usera\', and the current wor

ID: 3682296 • Letter: 1

Question

1. Suppose the home directory for a user is '/home/usera', and the current working directory is '/home/usera/document/work'. What is the current working directory after executing command 'cd ~/..'

home/usera

/home

/home/usera/document

/home/usera/document/work

2.

For an item 'atarget' with permission attribute '-rwxr-xr-x', how to change it to: read/write by the owner, read/execute by the group, execute by others?

chmod 651 atarget

chmod 641 atarget

chmod 754 atarget

chmod 741 atarget

3. What does the following command mean 'ls -l | more' ?

Redirect the output of 'more' command to the input of the 'ls -l' command.

Execute 'ls -l' and 'more' command in parallel.

Execute 'ls -l' and 'more' commands in sequence.

Tells the shell to connect the standard output of 'ls -l' to the standard input of  'more' by an inter-process communication mechanism called ananonymous pipe

Explanation / Answer

1. Ans: /home
   Explanation: ~ : means user home directory (/home/usera)
                  .. : immediate parent directory from current
          
2.   Ans: chmod 651 atarget
      
   read/write -        6 : 110(binary): first bit: read
                           second bit: write
                           third bit: execute
   read/execute -      5 : 101
   execute -            1 : 001
  
3.   ls -l | more
   Tells the shell to connect the standard output of 'ls -l' to the standard input of 'more' by an inter-process communication mechanism called ananonymous pipe