Calculate the resulting permission bits of setting the sticky bit on shared directories.
The sticky bit, 1000 in octal special-permissions notation, restricts file deletion within a directory: even if a directory is world-writable (allowing any user to create files in it), only a file's owner or root can delete or rename that specific file when the sticky bit is set — without it, anyone with write access to the directory could delete or rename any file inside regardless of who created it. This is exactly why /tmp and /var/tmp ship with mode 1777 (world-writable plus sticky) by default: every user needs to be able to create temporary files there, but users must not be able to tamper with or delete each other's temp files.
Sticky bit in octal notation
1000 = sticky bit; full mode = 1000 + owner/group/other permission bits (e.g. 1777)
`chmod +t /path/to/dir` sets it (equivalently `chmod 1777 /path/to/dir` for a fully world-writable directory with sticky protection); `chmod -t /path/to/dir` removes it. A sticky directory typically displays a trailing 't' (or 'T' if not executable/searchable) in `ls -ld` output.
`find / -xdev -type d -perm -0002 ! -perm -1000 2>/dev/null` finds world-writable directories where the sticky bit is NOT set — a common security audit check, since such directories allow any user to delete or rename files owned by other users.
On modern Linux, setting the sticky bit on a regular (non-directory) file has no effect — historically on some older Unix systems it hinted to the kernel to keep the program's text segment in swap for faster reloading, but this legacy 'saved text' behavior is obsolete on Linux.