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”.
Discusssion
Login to discuss.