Interview Prep/Linux/Filesystem Hierarchy, Inodes & Links

What does the sticky bit on /tmp do?

BeginnerConceptFilesystem Hierarchy, Inodes & Links
Answer

On a world-writable directory, the sticky bit (t) means only the file's owner, the directory owner, or root can delete or rename a file, even though everyone can write in the directory. Without it, any user could delete other users' temp files.

ls -ld /tmp          # drwxrwxrwt
chmod +t /shared
chmod 1777 /shared
All Linux questions Roadmap: Linux

More on Filesystem Hierarchy, Inodes & Links