top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

OS: What is the use of sticky bit?

+2 votes
323 views
OS: What is the use of sticky bit?
posted Nov 12, 2013 by Ganesh Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote
 
Best answer

A Sticky bit is a permission bit that is set on a file that lets only the owner of the file or the root user to delete or rename the file. No other user is given privileges to delete the file created by some other user.

But the main application of sticky bit is on the directory where if sticky bit is applied that means all user can create files but only file owners or root users can delete or rename files.

To apply sticky bit use

chmod +t <filename>
answer Nov 12, 2013 by Anderson
+1 vote

Current Sticky Bit concept -

Suppose i created a directory means i am the owner,But other user can create files in that directory and delete it too.
But if set the stick bit of the file only the owner can remove/move the file.
So Crete a file name queryhome.c
then chmod +t queryhome.c so that now sticky bit will be set,so only owner can play with this file
And to remove sticky bit we use chmod -t queryhome.c

Previous Use of sticky bit concept -
The idea was totally different as it was related to memory.
As when we runs a program 1st it is loaded in to memory then it is executed,Suppose think a condition we use that specific program regularly so each time will be loaded in to memory and will be executed.

But if we set the stick bit for the program then when the program closes the total part will not be vanished instead the text segment of the code will be at swap space as text segment doesn't change.

So our memory overhead is minimized.

when i was having this question before 2 months i found out here explained beautifully
http://www.thegeekstuff.com/2013/02/sticky-bit/

answer Nov 12, 2013 by Sachidananda Sahu
Similar Questions
+2 votes

I am confused with all 32/64 bit architecture for Hardware/OS/Binary, Can someone please help in clarifying this queries?

  1. Of'course 64 bit hardware is faster than 32 bit, still there are people who prefer 32 bit over 64 bit hardware, Why so?
  2. If I have 32 bit Hardware then On that can I run 64 bit OS? (and vice versa)
  3. If I have a 64 bit Hardware and 32 bit OS then what will be the speed of my OS, as per 32 bit or as per 64 bit? (and vice versa)
  4. If I have 32 bit OS then can I run binary of 64 bit on that? (and vice versa)
  5. Is it necessary to compile binary with 32/64 bit both or we can compile with any and use it in both?
  6. Is the speed of the process also depends on type of binary that I have? For example, If I have 64 bit hardware and 64 bit OS but I have a binary which is compiled with 32 bit compiler then what will be the speed difference?

P.S. I know its basic and silly queries but lets clear now before it gets too late. :)

+6 votes

What is the Translation Lookaside Buffer (TLB) and is it applicable in Linux also?

...