Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

75%
+4 −0
Q&A What does capital T mean in the output of 'ls -l'?

The reason why you don't find this in man ls is that the GNU project (that developed Coreutils) usually provides the complete documentation of its components not in classic manual pages, but in so ...

posted 2y ago by Quasímodo‭

Answer
#1: Initial revision by user avatar Quasímodo‭ · 2022-01-21T11:57:52Z (about 2 years ago)
The reason why you don't find this in `man ls` is that the GNU project (that developed Coreutils) usually provides the complete documentation of its components not in classic manual pages, but in so called Info documents (for more context, see [Unix & Linux: What is GNU Info for?][0]), and that is indeed disclaimed in the end of `man ls`.

The fragment you have quoted, which claims it is the sticky bit, is authoritative: It is from GNU Coreutils Info document itself, [§10.1.2 What information is listed][2]. And, for completeness, this is Coreutils, [§27.1 Structure of File Mode Bits][3], defining the jargon:

> **The restricted deletion flag or sticky bit.**
>
>    Prevent unprivileged users from removing or renaming a file in a directory unless they own the file or the directory; this is commonly found on world-writable directories like /tmp. For regular files on some older systems, save the program’s text image on the swap device so it will load more quickly when run, so that the image is “sticky”. 

Regarding "how to get rid of it", first note the [permissions symbolic notation][4], in which, skipping the foremost bit, which denotes file type,

- The 1st three bits (`rw-`) denote _owner_ — often called _user_ — permissions,
- The 2nd three bits (`rw-`) the _group_ permissions,
- The 3rd three bits (`r-T`) the _other_ permissions.

Thus, reading `man chmod`, simple ways to remove it are

    chmod o-t file
    chmod -t file

`o` means "other" and `-t` "remove the sticky bit". Since the `t` bit can only appear in the _other_ field, it can be omitted without ambiguity.

[0]: https://unix.stackexchange.com/questions/77514/what-is-gnu-info-for
[1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html
[2]: https://www.gnu.org/software/coreutils/manual/html_node/What-information-is-listed.html
[3]: https://www.gnu.org/software/coreutils/manual/html_node/Mode-Structure.html
[4]: https://en.wikipedia.org/wiki/File-system_permissions#Notation_of_traditional_Unix_permissions