The standards emerged from a project that began circa The committee found it more easily pronounceable and memorable, and thus adopted it.

Unix was selected as the basis for a standard system interface partly because it was "manufacturer-neutral". However, several major versions of Unix existed—so there was a need to develop a common-denominator system. IEEE Std It incorporated two minor updates or errata referred to as Technical Corrigenda TCs. POSIX mandates byte default block sizes for the df and du utilities, reflecting the typical size of blocks on disks.

Depending upon the degree of compliance with the standards, one can classify operating systems as fully or partly POSIX compatible. Certified products can be found at the IEEE's website. Some versions of the following operating systems have been certified to conform to one or more of the various POSIX standards. This means that they passed the automated conformance tests. The following are not officially certified as POSIX compatible, but they conform in large part to the standards by implementing POSIX support via some sort of compatibility feature usually translation libraries, or a layer atop the kernel.

Without these features, they are usually noncompliant. From Wikipedia, the free encyclopedia. Not to be confused with UnixUnix-likeor Linux. The Open Group. Retrieved 16 July Retrieved 28 September Retrieved 1 March Oracle Corporation.

utimes(2) - Linux man page

Retrieved 18 February The name libposix4 is maintained for backward compatibility and should be avoided. Retrieved 26 July Retrieved 18 December AA mole. Retrieved 26 January Retrieved 26 May Register of Open Branded Products. Retrieved 20 May Retrieved 16 January Most BSD-like systemsincluding macOShave always had an analogous chflags command to set the attributes, but no command specifically meant to display them; specific options to the ls command are used instead.

Solaris has no commands specifically meant to manipulate them.

File permissions and attributes

Other Unixesin general, have no analogous commands. Among other things, the chattr command is useful to make files immutable so that password files and certain system files cannot be erased during software upgrades. The command line tools chattr to manipulate attributes and lsattr to list attributes were originally specific to the Second Extended Filesystem family ext2ext3ext4and are available as part of the e2fsprogs package.

The btrfs file system includes the attribute functionality, including the C flag, which turns off the built-in copy-on-write CoW feature of btrfs due to slower performance associated with CoW. The form of the chattr command is:. The form of the lsattr command gnu 1. The chflags command is not specific to particular file systems.

The form of the chflags command is:. BSD-like systems, in general, have no default user-level command specifically meant to display the flags of a file. The ls command will do with either the -loor the -lOdepending on the system, flags passed. All traditional attributes can be set or cleared by the super-user; some can also be set or cleared by the owner of the file. Some attributes include:. BSD systems offer additional flags like offlinesnapshotsparse[4] and uarchive ; see References.

chattr posix

From Wikipedia, the free encyclopedia. Unix command-line interface programs and shell builtins. Categories : Unix file system-related software. Hidden categories: Pages using deprecated source tags. Namespaces Article Talk. Views Read Edit View history. By using this site, you agree to the Terms of Use and Privacy Policy.

chattr posix

When a file with the A attribute set is accessed, its atime record is not modified. A file with the a attribute set can only be open in append mode for writing. A file with the c attribute set is automatically compressed on the disk by the kernel.

A read from this file returns uncompressed data.On Unix-like operating systems, the tar command creates, maintains, modifies, and extracts files that are archived in the tar format.

It is an archiving file format. It was later formalized as part of the POSIX standard, and today is used to collect, distribute, and archive files, while preserving file system attributes such as user and group permissionsaccess and modification dates, and directory structures.

This documentation covers the GNU version of tarwhich is included with most modern variants of the Linux operating system. The first argument to tar should be a function specification: either one of the letters Acdrtuor xor one of the long function names. A function letter does not need to be prefixed with a dash " - "and may be combined with other single-letter options. A long function name must be prefixed with a double dash " -- ". Some options take a parameter ; with the single-letter form these must be given as separate arguments.

Specifying one of the following functions selects what tar 's main mode of operation will be:. Create archive archive. Here, the c tells tar you will be creating an archive; the f tells tar that the next option here it's archive. List the files in the archive archive. Here, the t tells tar to list the contents of an archive; v tells tar to operate verbosely; and f indicates that the next argument will be the name of the archive file to operate on.

Extract the files from archive archive. Extract the files from gzip ped archive archive. Here, the z tells tar that the archive will be compressed with gzip. Produce verbose output. Extract only files with the extension.

Brief Discussion of SUID & SGID

The r option is the same as the long option --append. Here, u is the same as the long option --update. Here, the archive file is specified as a dash " - "which tells tar to send its archived output to the standard output rather than a file on disk. This output is then piped to the wc command, which reports how many bytes -c were in the input it received.

Create DogPhotos. Search the hope. The returned results would resemble the line shown below. In the above example, the tar command would extract the one file myfile. The full path to this file was determined by using the example shown earlier. Home Help Linux. Description Syntax Examples Related commands Linux commands help. Was this page useful?

Specifies drive and density. If you're not sure what this means, you don't need to use this option. Use the archive's suffix to determine the compression program. For example, if this option is specified, an archive with the extension. Add file to the archive. This option is especially useful when the name of the file begins with a dash. Preserve access times on archived files, either by restoring the times, or if the operating system supports it not changing them in the first place.

Rather than deleting files from the file system, tar will back them up using the specified backup method backup-methodwhich may be one of the following: tnumbered.

Display string string on standard error; before output, any metacharacters in string are expanded. Delay setting modification times and permissions of extracted directories until extraction has ended.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. The dark mode beta is finally here.

Change your preferences any time. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on.

Is there any rule set which tells when I should, and when I should not, escape special characters? Which characters you must and which you mustn't escape indeed depends on the regex flavor you're working with. You cannot use it to escape anything. You have to use "clever placement" if you want to include character class metacharacters as literals. Some implementations e. Escaping a character other than. If all this makes your head spin, grab a copy of RegexBuddy. On the Create tab, click Insert Token, and then Literal.

RegexBuddy will add escapes as needed. PCRE compatibility may vary. PCRE support may be enabled in later versions or by using extensions. Outside a character class:. Unfortunately there really isn't a set set of escape codes since it varies based on the language you are using. However, keeping a page like the Regular Expression Tools Page or this Regular Expression Cheatsheet can go a long way to help you quickly filter things out. And even then, there are quirks because of the historical implementations of the utilities standardized by POSIX.

There isn't a simple rule for when to use which notation, or even which notation a given command uses. Really, there isn't. So if you try to escape these you may be doing the opposite of what you want. Sometimes simple escaping is not possible with the characters you've listed.

For example, using a backslash to escape a bracket isn't going to work in the left hand side of a substitution string in sed, namely. BTW Character classes are pretty vanilla regexp components so they tend to work in most situations where you need escaped characters in regexps.

Extended attributes, Capabilities and POSIX ACLs

Edit: After the comment below, just thought I'd mention the fact that you also have to consider the difference between finite state automata and non-finite state automata when looking at the behaviour of regexp evaluation. You might like to look at "the shiny ball book" aka Effective Perl sanitised Amazon linkspecifically the chapter on regular expressions, to get a feel for then difference in regexp engine evaluation types.

Now that was an interesting programming course! Along with the one on Simula. To know when and what to escape without attempts is necessary to understand precisely the chain of contexts the string pass through. You will specify the string from the farthest side to its final destination which is the memory handled by the regexp parsing code.

Be aware how the string in memory is processed: if can be a plain string inside the code, or a string entered to the command line, but a could be either an interactive command line or a command line stated inside a shell script file, or inside a variable in memory mentioned by the code, or an string argument through further evaluation, or a string containing code generated dynamically with any sort of encapsulation When you want to pass the character literally without using its special function local to the contextthan that's the case you have to escape it, for the next contextIt can be used to change the mode, owner, access time, modification time, change time, reference time, audit flags, general attribute flags, file tag, and file format and size.

The file to be impacted is defined by the pathname argument. For proper behavior the user should ensure that this structure has been initialized to zeros before it is populated.

Possible reasons include: The calling process was attempting to set access time or modification time to current time, and the effective UID of the calling process does not match the owner of the file; the process does not have write permission for the file; or the process does not have appropriate privileges. The calling process was attempting to truncate the file, and it does not have write permission for the file.

EFBIG The calling process was attempting to change the size of a file, but the specified length is greater than the maximum file size limit for the process. ELOOP A loop exists in symbolic links that were encountered during resolution of the pathname argument. This error is issued if more than 24 symbolic links are detected in the resolution of pathname.

File name truncation is not supported. EPERM The operation is not permitted for one of the following reasons: The calling process was attempting to change the mode or the file format but the effective UID of the calling process does not match the owner of the file, and the calling process does not have appropriate privileges.

The calling process was attempting to change the owner but it does not have appropriate privileges. The calling process was attempting to change the general attribute bits but it does not have write permission for the file. The calling process was attempting to set a time value not current time but the effective UID does not match the owner of the file, and it does not have appropriate privileges. The calling process was attempting to set the change time or reference time to current time but it does not have write permission for the file.

The calling process was attempting to change auditing flags but the effective UID of the calling process does not match the owner of the file and the calling process does not have appropriate privileges. The calling process was attempting to change the Security Auditor's auditing flags but the user does not have auditor authority.

EROFS pathname specifies a file that is on a read-only file system. Parent topic: Library functions. Modified Values for Indicated Attributes to Change. User ID of the owner of the file. Group ID of the Group of the file.

Controlled Flag Mask. Time of last access. Time of last data modification. Area for auditor audit info. Area for user audit info. Time of last file status change.These file systems are sometimes referred to in the document as non-NSS file systems.

chattr posix

The root user has all permissions needed to perform backup of any Linux path. You can use the Linux chmod 8 and chown 8 commands to give the backup user the Linux POSIX permissions to the directory being backed up. The table uses the definition of metadata structure fields from the definition of the structure stat. See man page stat 2 for more information.

chattr posix

Additionally, TSAFS also backs up the following information for a file or directory when applicable. For more information on file attributes on a Linux second extended file system, see man page chattr 1installed by the RPM e2fsprogs.

futimens(3) - Linux man page

Backing up and restoring Extended Attributes is supported within the same file system, but restoration is not supported across different file systems. During restoration, a non- root user cannot overwrite the read-only files to the POSIX-complaint file systems, because write access is required for updating the files. File Types. Mode of the file, including File types and File access permissions. Number of hard links to the file.

Time of last data modification.By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up. I try permissions, gid, acl with no luck. You should be able to achieve something by setting extended attributes with chattr. This will allow them to be added to but will stop them from having files removed.

The best you can accomplish is a directory where users will be able to delete any files they own, but not those of other users. Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. Linux: Create files and direcotires but not delete them Ask Question. Asked 7 years, 6 months ago. Active 7 years, 6 months ago. Viewed 8k times.

What is the correct way to do that? Peraz Peraz 23 1 1 silver badge 4 4 bronze badges. Active Oldest Votes. The perfect combination. Stone Stone 6, 16 16 silver badges 33 33 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook.

Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Featured on Meta.