Extended file attributes

Extended file attributes

Extended file attributes is a file system feature that enables users to associate computer files with metadata not interpreted by the filesystem, whereas regular attributes have a purpose strictly defined by the filesystem (such as permissions or records of creation and modification times). Unlike forks, which can usually be as large as the maximum file size, extended attributes are usually limited in size to a value significantly smaller than the maximum file size. Typical uses can be storing the author of a document, the character encoding of a plain-text document, or a checksum.

OS/2

In OS/2 version 1.2 and later, the High Performance File System was designed with extended attributes in mind, but support for them was also retro-fitted on the FAT filesystem of DOS.For compatibility with other operating systems using a FAT partition, OS/2 attributes are stored inside a single file "EA DATA. SF" located in the root directory. This file is normally inaccessible when an operating system supporting extended attributes manages the disk, but can be freely manipulated under, for example, DOS. Files and directories having extended attributes useone or more clusters inside this file. The logical cluster number of the first used cluster is stored inside the owning file's or directory's directory entry, in two previously unused bytes. These two bytes are used for other purposes on the FAT32 filesystem, and hence OS/2 extended attributes cannot be stored on this filesystem.

Parts of OS/2 version 2.0 and later such as the Workplace Shell uses several standardized extended attributes (also called "EAs") for purposes like identifying the filetype, comments, computer icons and keywords about the file.Programs written in the interpreted language Rexx store an already parsed version of the code as an extended attribute, to allow faster execution.

Windows NT

Windows NT supports extended attributes on FAT and HPFS filesystems in the same way as OS/2 does. The NTFS file system was also designed to store them, as one of the many possible file forks, to accommodate the OS/2 subsystem. OS/2 extended attributes are accessible to any OS/2 programs the same way as in native OS/2 and to any Windows program through the BackupRead and BackupWrite system calls. They are notably used by the NFS server of the Interix POSIX subsystem in order to implement Unix-like permissions.

Linux

In Linux, the ext2, ext3, ext4, JFS, ReiserFS and XFS filesystems support extended attributes (abbreviated "xattr") if the "libattr" feature is enabled in the kernel configuration. Any regular file may have a list of extended attributes. Each attribute is denoted by a name and the associated data. The name must be a null-terminated string, and must be prefixed by a namespace identifier and a dot character. Currently, four namespaces exist: user, trusted, security and system. The user namespace has no restrictions with regard to naming or contents. The system namespace is primarily used by the kernel for access control lists. The security namespace is used by SELinux, for example.

Extended attributes are not widely used in user-space programs in Linux, although they are supported in the 2.6 and later versions of the kernel. Beagle does use extended attributes, and freedesktop.org publishes [http://www.freedesktop.org/wiki/CommonExtendedAttributes recommendations] for their use.

FreeBSD

In FreeBSD 5.0 and later, the UFS1 and UFS2 filesystems support extended attributes. Any regular file may have a list of extended attributes. Each attribute is denoted by a name and the associated data. The name must be a null-terminated string, and exists in a namespace identified by a small-integer namespace identifier. Currently, two namespaces exist: user and system. The user namespace has no restrictions with regard to naming or contents. The system namespace is primarily used by the kernel for access control lists.

Extended attributes are not widely used in user-space programs in FreeBSD.

olaris

The Solaris operating system version 9 and later allows files to have "extended attributes", which are effectively forks. Internally, they are actually stored and accessed like normal files, so their names cannot contain "/" characters, their size is practically unlimited and their ownership and permissions can differ from those of the parent file.

Version 4 of the Network File System supports extended attributes in much the same way as Solaris.

Mac OS X

Mac OS X 10.4 and later support extended attributes by making use of the HFS+ filesystem Attributes file B*-Tree feature which allows for named forks. Although the named forks in HFS+ support arbitrarily large amounts of data through extents, the OS support for extended attributes only supports inline attributes limiting their size to that which can fit within a single B-Tree node. Any regular file may have a list of extended attributes. HFS+ supports an arbitrary number of named forks, and it is unknown if the Mac OS imposes any limit on the number of extended attributes. Each attribute is denoted by a name and the associated data. The name is a Unicode string that must be a null-terminated string.The Mac OS X APIs support listing [ [http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/listxattr.2.html listxattr man page for Mac OS X] ] , getting [ [http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/getxattr.2.html getxattr man page for Mac OS X] ] , setting [ [http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/setxattr.2.html setxattr man page for Mac OS X] ] , and removing [ [http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/removexattr.2.html removexattr man page for Mac OS X] ] extended attributes from files or directories.

See also

* fork (filesystem)
* attribute-value pair
* File attribute

External links

* http://acl.bestbits.at/ - Linux Extended Attributes and ACLs or libattr
* [http://www.tavi.co.uk/os2pages/eadata.html Implementation of OS/2 extended attributes on the FAT file system]
* The [http://docs.sun.com/app/docs/doc/819-2252/fsattr-5?l=fr&a=view&q=fsattr fsattr(5)] man page for Solaris 10


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • File system — For library and office filing systems, see Library classification. Further information: Filing cabinet A file system (or filesystem) is a means to organize data expected to be retained after a program terminates by providing procedures to store,… …   Wikipedia

  • File attribute — A file attribute is metadata that describes or is associated with a computer file. For example, an operating system often keeps track of date a file was created and last modified, as well as the file s size and extension (and what application to… …   Wikipedia

  • File area network — File Area Networking refers to various methods of sharing files over a network such as storage devices connected to a file server or network attached storage (NAS). Background Data storage technology over the years has evolved from a direct… …   Wikipedia

  • File Allocation Table — For other uses, see Fat (disambiguation). FAT Developer Microsoft Full Name File Allocation Table FAT12 (12‑bit version) FAT16/FAT16B (16‑bit versions) FAT32 (32‑bit version with 28 bits used) Introduced …   Wikipedia

  • File Allocation Table — Das File Allocation Table (vom Englischen etwa für „Dateizuordnungstabelle“; Abkürzung FAT, englische Aussprache [fæt]) ist ein von Microsoft entwickeltes Dateisystem. Inhaltsverzeichnis 1 Hintergrund 2 Aufbau 2.1 Bootsektor …   Deutsch Wikipedia

  • File Transfer Protocol — (FTP) is a network protocol used to transfer data from one computer to another through a network such as the Internet.FTP is a file transfer protocol for exchanging and manipulating files over a TCP computer network. A FTP client may connect to a …   Wikipedia

  • Be File System — BFS Developer Be Inc. Full name Be File System Introduced May 10, 1997 (BeOS Advanced Access Preview Release[1]) Partition identifier Be BFS (Apple Partition Map) 0xEB (MBR) …   Wikipedia

  • Veritas File System — For other uses, see Veritas (disambiguation). VERITAS File System Full name VERITAS File System Introduced 1991 Structures Directory contents extensible hash Limits Max file size 8 EB ( …   Wikipedia

  • File format — A file format is a particular way that information is encoded for storage in a computer file. Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice …   Wikipedia

  • ZIP (file format) — unzip redirects here. For the program, see Info ZIP. ZIP Filename extension .zip .zipx (newer compression algorithms) Internet media type application/zip Uniform Type Identifier com.pkware.zip archive Magic …   Wikipedia

Share the article and excerpts

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