FACTOID # 145: Three of the top ten countries for GDP per capita are island nations: Bermuda, Cayman Islands, and Iceland.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Sticky bit

The sticky bit is an access-right flag that can be assigned to files and directories on Unix systems. In computer programming, flag refers to one or more bits that are used to store a binary value or code that has an assigned meaning. ... A computer file is a collection of information that is stored in a computer system and can be identified by its full path name. ... In computing, a directory, catalog, or folder, is an entity in a file system which can contain a group of files and/or other directories. ... Filiation of Unix and Unix-like systems Unix (officially trademarked as UNIX®) is a computer operating system originally developed in the 1960s and 1970s by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. ...

Contents

History

The sticky bit was introduced in the Fifth Edition of Unix in 1974 for use with pure executable files. When set, it instructed the operating system to retain the text segment of the program in swap space after the process exited. This speeded subsequent executions by allowing the kernel to make a single operation of moving the program from swap to real memory. Thus, frequently-used programs like editors would load notably faster. One notable problem with "stickied" programs was replacing the executable (for instance, during patching); to do so required removing the sticky bit from the executable, executing the program and exiting to flush the cache, replacing the binary executable, and then restoring the sticky bit. This article or section is not written in the formal tone expected of an encyclopedia article. ... // An operating system (OS) is a set of computer programs that manage the hardware and software resources of a computer. ... A text segment is the code (computer programming) in an object file. ... How virtual memory maps to physical memory Virtual memory is an addressing scheme implemented in hardware and software that allows non-contiguous memory to be addressed as if it were contiguous. ... In computing, a process is an instance of a computer program that is being executed. ... In computing, a patch is a small piece of software designed to update or fix problems with a computer program or its supporting data. ...


The speed gain was largely lost when Unix was ported to hardware supporting direct memory access (as well as somewhat obsoleted with the replacement of swapping with demand paging). Nonetheless, it remains operative in several System V variants (notably Solaris[1] and HP-UX). The 4.4-Lite release of BSD retained the old sticky bit behavior but it has been subsequently dropped from OpenBSD (as of release 3.7) and FreeBSD (as of release 2.2.1); it remains in NetBSD. No version of Linux has ever supported the traditional behavior. Direct memory access (DMA) is a feature of modern computers that allows certain hardware subsystems within the computer to access system memory for reading and/or writing independently of the central processing unit. ... In computer operating systems, demand paging is an application of virtual memory. ... AT&T UNIX System V was one of the versions of the UNIX operating system. ... Solaris is a computer operating system developed by Sun Microsystems. ... HP-UX (Hewlett Packard UniX) is Hewlett-Packards proprietary implementation of the Unix operating system, based on System V (initially System III). ... Berkeley Software Distribution (BSD, sometimes called Berkeley Unix) is the Unix derivative distributed by the University of California, Berkeley, starting in the 1970s. ... OpenBSD is a freely available Unix-like computer operating system descended from Berkeley Software Distribution (BSD), a Unix derivative developed at the University of California, Berkeley. ... FreeBSD is a Unix-like free operating system descended from AT&T UNIX via the Berkeley Software Distribution (BSD) branch through the 386BSD and 4. ... NetBSD is a freely redistributable, open source version of the Unix-like BSD computer operating system. ... Linux (IPA pronunciation: ) is a Unix-like computer operating system. ...


Usage

The most common use of the sticky bit today is on directories, where, when set, items inside the directory can be renamed or deleted only by the item's owner, the directory's owner, or the superuser. (Without the sticky bit set, a user with write and execute permissions for the directory can rename or delete any file inside, regardless of the file's owner.) Frequently this is set on the /tmp directory to prevent ordinary users from deleting or moving other users' files. This feature was introduced in 4.3BSD in 1986 and today it is found in most modern Unixes. On many computer operating systems, superuser, or root, is the term used for the special user account that is controlled by the system administrator. ...


In addition, Solaris (as of Solaris 2.5) defines special behavior when the sticky bit is set on non-executable files: those files, when accessed, will not be cached by the kernel. This is usually set on swap files to prevent access on the file from flushing more important data from the system cache. It is also used occasionally for benchmarking tests. This article is about the computer term. ... A kernel connects the application software to the hardware of a computer. ... Virtual memory is intended to help the programmer by taking care of some memory housekeeping duties. ... In computing, a benchmark is the act of running a computer program, a set of programs, or other operations, in order to assess the relative performance of an object, normally by running a number of standard tests and trials against it. ...


The sticky bit is also set by the automounter to indicate that a file has not been mounted yet. This allows programs like ls to ignore unmounted remote files. The Berkeley Automounter (or amd) first appeared in 4. ...


Examples

The sticky bit can be set using the chmod command and can be set using its octal mode 1000 or by its symbol t (s is already used by the setuid bit). For example, to add the bit on the directory /usr/local/tmp, one would type chmod +t /usr/local/tmp. Or, to make sure that directory has standard tmp permissions, one could also type chmod 1777 /usr/local/tmp. The chmod command (abbreviated from change mode) is a shell command in Unix and Unix-like environments. ... setuid and setgid are Unix terms, which are short for Set User ID and Set Group ID, respectively. ...


In Unix symbolic file system permission notation, the sticky bit is represented by the letter t in the final character-place. For instance, on Solaris 8, the /tmp directory, which by default has the sticky-bit set, shows up as: Most modern file systems have methods of administering permissions or access rights to specific users and groups of users. ...

 $ ls -ld /tmp drwxrwxrwt 4 root sys 485 Nov 10 06:01 /tmp 

If the sticky-bit is set on a file or directory without the execution bit set for the others category (non-user-owner and non-group-owner), it is indicated with a capital T:

 # ls -l test -rw-r--r-- 1 root other 0 Nov 10 12:57 test # chmod +t test; ls -l test -rw-r--r-T 1 root other 0 Nov 10 12:57 test 

References

  1. ^ Solaris 10 chmod(2) man page.

External Links

  1. File and Directory Permissions
  2. chmod Linux Man Page

  Results from FactBites:
 
The sticky bit and directories (498 words)
A directory with the sticky bit set means that only the file owner and the superuser may remove files from that directory.
Unlike with file sticky bits, the sticky bit on directories remains there until the directory owner or superuser explicitly removes the directory or changes the permissions.
If you are unsure, it is far better to set the sticky bit on a directory than to leave it off.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.