Home / Programming MCQs / Linux MCQs / Question

S

Sandeep • 6.47K Points
Tutor III

Q. The -rwxr-xr-t permissions represented by the following octal value.

(A) 0777
(B) 1755
(C) 1754
(D) 2754
Explanation by: Sandeep
The sticky bit ($ chmod +t file-name) was introduced for use with executables to allow to an operating system to keep the program’s text segment in swap space after the process has finished. It was a performance feature designed to speed up program execution. The sticky bit is most commonly used on directories where it allows files or directories to be moved or deleted only by the owner of that object, the owner of the directory or the root superuser. To define the sticky bit on a file, the octal value is 1000 and the symbolic value is “t”.
String notation:
$ chmod o+t file1.txt
 
Numeric notation:

$ chmod 1755 file1.txt
 
The sticky bit has no effect if other does not have execution permissions. The sticky bit is represented with a lowercase “t” in the output of ls. In cases where it has no effect, it is represented by a capital “T”.

$ ls -l file1
-rwxr-xr-t 1 user1 user1 0 2018-10-29 21:41 file1

You must be Logged in to update hint/solution

Discusssion

Login to discuss.