Chattr

Chattr

chattr is a Linux command that allows a user to set certain attributes on a file. Mostly chattr is used to make files "immutable" so that password files and certain system files cannot be erased during software upgrades.man|1|chflags|OpenBSD] It is analogous to the attrib command on DOS, OS/2 and Microsoft Windows operating systems, and "chflags" on modern BSD systems (including Mac OS X). Other Unix systems have no analogous commands; Solaris supports extended file attributes, but there are no user level commands for setting or changing them, and the chatr command in HP-UX, and chattr in AIX have unrelated functions.

yntax

The form of the chattr command is:

chattr [-RV] [-+=AacDdijsSu] [-v version] files

where

* -R is to recurse all subdirectories
* +i is to set the immutable bit to prevent even root from erasing or changing the contents a file.

Note: The superuser can't erase or write on the file, but he or she can set or unset the i attribute.

Attributes

Some attributes include:

* don't update atime (A)
* synchronous updates (S)
* synchronous directory updates (D)
* append only (a)
* compressed (c)
* no dump (d)
* immutable (i)
* data journalling (j)
* secure deletion (s)
* top of directory hierarchy (T)
* no tail-merging (t)
* undeletable (u)

See also

* lsattr – view file attributes
* chown – change file/directory ownership
* chmod – change file access control attributes
* cacls – Microsoft Windows NT file system ACL control utility

Notes

References

*man|1|chflags|OpenBSD
*man|1|chflags|FreeBSD


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Chattr — изменяет атрибуты файлов на файловой системе ext2fs Содержание 1 Синтаксис 2 Описание 3 Ключи POSIX 4 …   Википедия

  • chattr — is a command in the Linux operating system that allows a user to set certain attributes on a file residing on an ext2 based filesystem. chflags is the analogous command on modern BSD systems, including Mac OS X. The commands are similar to the… …   Wikipedia

  • chattr — изменяет атрибуты файлов на файловой системе ext2fs Содержание 1 Синтаксис 2 Описание 3 Ключи POSIX 4 …   Википедия

  • Lsattr — NOTOC lsattr is a command line program for listing the attributes on a Linux second extended file system (ext2). [http://linux.about.com/library/cmd/blcmdl1 lsattr.htm lsattr man] ] It is also a command to display attributes of devices on an AIX… …   Wikipedia

  • Ext2 — Hersteller Rémy Card Vollständige Bezeichnung Second extended file system Erstveröffentlichung Januar 1993 (Linux) Partitionskennung Apple UNIX SVR2 (Apple Partition Map) 0x83 (Master Boot Record) EBD0A0A2 B9E5 4433 87C0 68B6B72699C7 (GPT …   Deutsch Wikipedia

  • Ext2fs — ext2 Hersteller Rémy Card Vollständige Bezeichnung Second extended file system Erstveröffentlichung Januar 1993 (Linux) Partitionskennung Apple UNIX SVR2 (Apple Partition Map) 0x83 (Master Boot Record) EBD0A0A2 B9E5 4433 87C0 68B6B72699C7 (GPT …   Deutsch Wikipedia

  • Second extended Filesystem — ext2 Hersteller Rémy Card Vollständige Bezeichnung Second extended file system Erstveröffentlichung Januar 1993 (Linux) Partitionskennung Apple UNIX SVR2 (Apple Partition Map) 0x83 (Master Boot Record) EBD0A0A2 B9E5 4433 87C0 68B6B72699C7 (GPT …   Deutsch Wikipedia

  • Orlov (asignador de bloques de disco) — Para otros usos de este término, véase Orlov (desambiguación). Orlov es un asignador de bloques de disco originario de BSD y que se incluye en los sistemas de ficheros nativos de Linux ext3 y ext4 pues mejora el rendimento respecto al anterior… …   Wikipedia Español

  • ext2 — Hersteller Rémy Card Vollständige Bezeichnung Second extended file system Erstveröffentlichung Januar 1993 (Linux) Partitionskennung Apple UNIX SVR2 (Apple Partition Map) 0x83 (Master Boot Record) EBD0A0A2 B9E5 4433 87C0 68B6B7269 …   Deutsch Wikipedia

  • List of DOS commands — A partial list of the most common commands for Microsoft s MS DOS operating system follows. It contains also a few Win32 command line tools which can t run in DOS. In versions 5 of DOS and later only, the user can get help by typing HELP at the… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”