Computer Science - Unix

Exercise :: Unix - Section 2

16. 

Which of the following commands is used to absolutely assign all permissions to the owner, read and write permissions to the group and only executable permission to the others of the file note?

A. chmod 761 note
B. chmod 671 note
C. chmod 167 note
D. chmod 4=rwx, g=rw note
E. None of the above

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

17. 

The chmod ugo+rw note command can be represented in octal notation as

A. chmod 555 note
B. chmod 666 note
C. chmod 444 note
D. chmod 333 note
E. None of the above

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

18. 

Which of the following commands is used to display the filenames in multiple columns with indication of directories and executable file?

A. ls -F -x
B. ls -l
C. ls ~ x
D. Ip
E. None of the above

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

19. 

Which command is used with vi editor to search a pattern in the forward direction?

A. /
B. ?
C. //
D. ??
E. None of the above

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

20. 

Which of the following commands is used to assign executable permission to the owner of the file named "note"?

A. chmod g+x note
B. chmod u+w note
C. chmod u+x note
D. chmod ugo+x note
E. None of the above

Answer: Option C

Explanation:

Users selection:

u - user: the owner of the file.
g - group: users who are members of the file's group.
o - others: users who are not the owner of the file or members of the group.
a - all: all three of the above, is the same as ugo.

Permissions:

r - read
w - write
x - execute

So, u+x => Execute (x) permission to Owner (u).