Sticky Bit
The sticky bit (octal 1000) once asked the kernel to keep an executable's text in swap. Its surviving use is on directories like /tmp: it restricts deletion of files inside to each file's owner, making world-writable scratch space safe.
The sticky bit is a permission flag (octal 1000) on Unix-like systems. Originally introduced in Version 7 Unix in 1979, the name comes from its first purpose: on executables it asked the kernel to keep the program's text segment in swap after exit so subsequent launches were faster. Demand paging and modern caches obsoleted that use, and almost every contemporary Unix ignores the bit on regular files. The surviving meaning is the directory variant added by 4.3BSD. When set on a directory, the sticky bit restricts deletion and renaming: a user can only remove or rename an entry if they own the entry itself or the directory, regardless of write permission on the directory. Without this restriction, write access to a directory implies the ability to delete any file inside it — which is unworkable for shared scratch space. The canonical user is `/tmp`, typically mode 1777: world-writable so any process can create temp files, but sticky so users cannot delete one another's. `/var/tmp` and `/dev/shm` share the same pattern. In `ls -l` the bit shows as `t` in the other-execute slot (`drwxrwxrwt`), or `T` if execute is unset on `other`. Without the sticky bit on a shared writable directory, any user could wipe or replace another's files — a classic source of denial-of-service and symlink-attack bugs. The combination of sticky-plus-1777 on `/tmp` is one of the small Unix design choices that quietly holds multi-user systems together.