Install the complete package with local command reference and every published mode.
install attrattrRead portable file metadata and extended attributes; available xattrs can also be written or removed.
Start with portable keys when you need predictable metadata across hosts; use extended-attribute keys only when the server actually exposes them.
attr [path [key]] [-x|-d|-s <value>]attrshow portable metadata for the current directory
attr <path>show extended keys or portable metadata
attr <path> <key>show a portable field or extended-attribute value
attr <path> <key> : <value>set raw text for an extended attribute
-xshow the selected value as hexadecimal
-s <value>set a text value for an extended attribute
-ddelete an extended attribute
The stable portable keys are path, type, permissions, access, size, mime, dimensions and modified. They are read-only and keep these English machine names in every interface language. size, mime and dimensions appear only when they apply to the selected path. A portable key takes precedence over an extended attribute with the same bare name; namespaced xattr keys such as user.note remain unambiguous.
When xattr is supported,
Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.
The XML extension does not change the filesystem checks; MIME information is added only when PHP can identify it.
Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.
Base and Minimum are two packages of the same current module release, not separate command versions.
Install the complete package with local command reference and every published mode.
install attrInstall the reduced package. Local reference is omitted;
install attr -mInstall exactly this published version.
install attr -v 1.3.1Ask upgrade to check compatibility and replace the installed block only when needed.
upgrade attrRemove the extension block while leaving the core and unrelated modules intact.
install attr -uExamples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.
cd \sandbox | attr feed.xml | attr feed.xml permissionsfeed.xml
path feed.xml
type file
permissions 0644
size 1.3 KB
mime application/xml
permissions 0644The XML extension does not change the filesystem checks; MIME information is added only when PHP can identify it.
attr sandbox/feed.xml permissions0644Recognized images add pixel dimensions to the same portable file metadata.
attr sandbox/feed.xml user.note : reviewedpath sandbox/data/sample.txt
type file
permissions 0644
readable yes
writable yesDirectories keep their own filesystem type and omit file-only size, MIME and image fields.
attr sandbox/feed.xml user.notepath sandbox/data/sample.txt
type file
permissions 0644
readable yes
writable yesattr sandbox/feed.xml > attr.logpath sandbox/data/sample.txt
type file
permissions 0644
readable yes
writable yesattr \sandbox\missing.txtPath not foundsandbox/feed.xmlThe example uses a file or directory from the protected /sandbox/ documentation workspace.
<?xml version="1.0" encoding="UTF-8"?>
<feed>
<title>lil-sandbox</title>
<entry id="1">Example XML content</entry>
</feed>
Moves extended-attribute value assignment to : and keeps portable metadata selectors read-only, so > has one system-wide meaning.