Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sticky(7) [freebsd man page]

STICKY(7)					       BSD Miscellaneous Information Manual						 STICKY(7)

NAME
sticky -- sticky text and append-only directories DESCRIPTION
A special file mode, called the sticky bit (mode S_ISTXT), is used to indicate special treatment for directories. It is ignored for regular files. See chmod(2) or the file <sys/stat.h> for an explanation of file modes. STICKY DIRECTORIES
A directory whose `sticky bit' is set becomes an append-only directory, or, more accurately, a directory in which the deletion of files is restricted. A file in a sticky directory may only be removed or renamed by a user if the user has write permission for the directory and the user is the owner of the file, the owner of the directory, or the super-user. This feature is usefully applied to directories such as /tmp which must be publicly writable but should deny users the license to arbitrarily delete or rename each others' files. Any user may create a sticky directory. See chmod(1) for details about modifying file modes. HISTORY
A sticky command appeared in Version 32V AT&T UNIX. BUGS
Neither open(2) nor mkdir(2) will create a file with the sticky bit set. BSD
June 5, 1993 BSD

Check Out this Related Man Page

STICKY(8)						    BSD System Manager's Manual 						 STICKY(8)

NAME
sticky -- sticky text and append-only directories DESCRIPTION
A special file mode, called the sticky bit (mode S_ISVTX), is used to indicate special treatment for shareable executable files and directo- ries. See chmod(2) or the file /usr/include/sys/stat.h for an explanation of file modes. STICKY TEXT EXECUTABLE FILES
The sticky bit has no effect on executable files. All optimization on whether text images remain resident in memory is handled by the ker- nel's virtual memory system. STICKY DIRECTORIES
A directory whose `sticky bit' is set becomes an append-only directory, or, more accurately, a directory in which the deletion of files is restricted. A file in a sticky directory may only be removed or renamed by a user if the user has write permission for the directory and the user is the owner of the file, the owner of the directory, or the super-user. This feature is usefully applied to directories such as /tmp which must be publicly writable but should deny users the license to arbitrarily delete or rename each others' files. Any user may create a sticky directory. See chmod(1) for details about modifying file modes. BUGS
Neither open(2) nor mkdir(2) will create a file with the sticky bit set. HISTORY
A sticky command appeared in Version 32V AT&T UNIX. 4th Berkeley Distribution June 5, 1993 4th Berkeley Distribution
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rename files/directories based on their name

i have hundreds of directories that have to be renamed. the directory structure is fairly uniform which makes the scripting a little simpler. suppose i have many directories like this */*/*/*abc* (in other words i have similar directory names 3 dirs deep that all contain the pattern abc in... (8 Replies)
Discussion started by: quantumechanix
8 Replies

2. UNIX for Dummies Questions & Answers

Entering directories structured above user.

I wish to enter directories which are on the HD but not part of the user hierarchy and have access to the contents of an external HD. To an advanced user this is probably a stupid question but I experimented with ~, cd, . and.. to no avail. I did check for a suitable command but couldn't find one.... (9 Replies)
Discussion started by: Frank Hunter
9 Replies

3. UNIX for Dummies Questions & Answers

Delete all files of a particular user

How do I delete all directories and files belonging to a particular userid in a directory and its subdirs? (9 Replies)
Discussion started by: abhilashnair
9 Replies

4. UNIX for Dummies Questions & Answers

Sticky Bit????

HI What is sticky bit? how can be see if the sticky bit for file is set? WHat is meaning of sticky bit set on Directory? What is the syntax to set the sticky bit? With example Thanks (10 Replies)
Discussion started by: skyineyes
10 Replies

5. UNIX for Dummies Questions & Answers

Moving all user files to another/new directory

Hi Experts, I need your help for a new query. Query is to move all specified user files from a specified directory to another directory. eg i've 5 files in /export/home/users created by the gaurav(unix ID). i want to move all 5 files of gaurav from /export/home/users to... (11 Replies)
Discussion started by: gav_dhiman
11 Replies

6. UNIX for Dummies Questions & Answers

Need help to find the files under a directory

Hi, I wanted to delete all the files under a directory "/apps/tmp/" which are two weeks older. But i should not delete the sub-directories and the contents of sub-directories. I also have searched in forum and found the following command, find . \( ! -name . -prune \) -mtime +13 -print ... (8 Replies)
Discussion started by: Sheethal
8 Replies

7. Solaris

Does Sticky Bit works in solaris as per definition

Hi all, I have trouble working with Sticky bit in solaris, I am able to delete files and directory from the directory who has sticky bit set , i have verified that i am neither owner of the file pr directories.. I have check in Solaris 7, 8 ,9 ,10, versions, that does not seem to work..... (8 Replies)
Discussion started by: kshama
8 Replies

8. UNIX for Dummies Questions & Answers

modifying ls() to support the display of file sequences?

Hi there, I'm new to the board and I did try a search, but couldn't quite find what I was looking for. I deal in mostly large sets of sequential files, usually images. I was wondering if someone has modified the standard ls() command, or created another command that would display standardly... (9 Replies)
Discussion started by: Dr_Flambe
9 Replies

9. UNIX for Dummies Questions & Answers

remove files from a directory

I have some empty files that were created from a script I ran that I cannot delete using the rm command.... any ideas as how I can delete them? -rw-r--r-- 1 schroeks x_exp 0 Jul 21 08:24 rrd15CEC -rw-r--r-- 1 schroeks x_exp 0 Jul 21 11:37 rrd15CEC -rw-r--r-- ... (20 Replies)
Discussion started by: freddie88
20 Replies

10. Shell Programming and Scripting

want file to regenerate after deletion

I looked into the sticky bit, but I think, if possible, that I would prefer to have the file recreate itself after deletion. The file is several directories deep, and from time to time the top level directory will be trashed. I need the file to recreate after this. Is it possible to perhaps... (13 Replies)
Discussion started by: glev2005
13 Replies

11. UNIX for Advanced & Expert Users

How UNIX admin set up this? how files of 744 of other owner can be removed by another owner?

Hi all, We have some files are under 744 permissions and the the owner is say owner1 and group1. Now we have another user owner2 of group2, owner2 can remove files of the owner1 and the permission of those files are 744, unix admin told us he did some config at his side so we can do that. ... (14 Replies)
Discussion started by: TheGunMan
14 Replies

12. UNIX for Dummies Questions & Answers

Combining files from different directories

I have two directories, each have 27 files with same name and now I want to combine them one by one into another directory with same names. I dont know how to use "and" for the "for loop" so it will not go in the circle. so my code has a problem I dont know how to fix :wall::wall::wall::wall:... (15 Replies)
Discussion started by: A-V
15 Replies

13. Solaris

Solaris sticky bit

i got this archive file on sticky bit mode. somehow i could not remove the sticky bit. i could not even copy or view the view using file user account or root account. -rw-r--r-T 1 mark support 875166720 Mar 23 2005 file_mig.dat anybody encounter this type of problem? i have done running... (11 Replies)
Discussion started by: uwagon
11 Replies

14. AIX

How to set owner and permission for files/directory in directory in this case?

Hi. My example: I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that chown -R log_adm /log/* chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies

15. OS X (Apple)

Warning using 'find'.

This is more of a discovery than a bug and for OSX 10.12.x, maybe earlier but I don't have them now. Consider this code:- # Auto-find the correct path and "sox" file, but it WILL take a very long time... # NOTE: It searches from YOUR HOME directory structure only, just modify to suit your... (8 Replies)
Discussion started by: wisecracker
8 Replies