📓
Knowledge
  • Knowledge Base
  • Applications
    • Gitbook
      • CSS Overrides
    • PiHole
      • Automated Whitelist Script
      • Block Lists
      • Config Files
      • DNS over HTTPS
      • Local DNS
    • SSH
      • SCP
      • SSH Keys
        • ssh-add
        • ssh-agent
        • ssh-keygen
      • SSH on Windows
      • SSH on macOS
    • Youtube-DL
      • Youtube-DL Config File
      • Youtube-DL .netrc File
  • Linux
    • Administration
      • dmesg
      • Unattended Upgrades
      • cron
        • cron.d Directory
        • Listing cron jobs
      • sudo
        • BUG: setrlimit(RLIMIT_CORE) Error
        • Add Sudo Privileges to User
      • System Restart Required
    • Applications
      • Apache
      • ddclient
        • Installing Latest (ddclient)
        • Cloudflare DNS (ddclient)
        • Commands (ddclient)
      • PHP
      • NGINX
        • Configuration Files Structure
    • Commands
      • ln -s : Symbolic Links
      • rsync
    • File System
      • File Management
        • Extended Attributes
        • find (command)
        • rsync (command)
        • tar (command)
      • File Sharing
        • AFP
        • SAMBA
        • NFS
      • Volume Management
      • ZFS on Linux
        • Reference Guides
        • Installing ZFS on Debian
        • Migrating ZFS Pools
        • sharenfs - Native ZFS NFS shares
    • Hardware
    • Networking
      • Disable IPv6
    • New System Setup
      • Debian Setup Guides
      • Disable CloudInit (Ubuntu)
      • Recommended packages
    • Package Management
      • apt Commands
      • apt Logs & History
      • Getting info about Packages
      • dpkg
      • dpkg-query
    • Performance & Diagnostics
      • Memory Usage
      • SMART Drive Tools
      • System Information
    • Remote Desktop
    • SystemD
      • Delay Docker until after ZFS init
      • Documentation for SystemD
      • Show Service's Connections
    • Users & Groups
      • Adding New Users
  • Shells
    • Change Default Shell
      • macOS
    • Get Shell Information
    • Screen
    • Terminal Emulators
      • iTerm2
    • zsh
      • macOS Config
  • macOS
    • Hostname - macOS
    • Homebrew
      • Formulae (packages)
        • speedtest-cli
  • BASH
    • Check if File / Directory Exists
  • Docker
    • Docker Networking
    • Install Docker
      • Enable Memory Swappiness - Linux
    • Docker Compose
      • Environmental Variables for Compose
    • Docker Networking
    • Docker Commands
      • docker attach
  • Python
    • Virtual Environments
  • Web Services
    • DNS Records
      • DNS SPF Record
      • WHOIS - Lookup
    • Domain Parking
    • IANA Registered Ports & Services
Powered by GitBook
On this page
  • chattr
  • Man Page
  • Syntax
  • Description
  • lsattr
  • Man Page
  • Syntax
  • Options
  • removexattr
  1. Linux
  2. File System
  3. File Management

Extended Attributes

Extended File Attributes on Linux

PreviousFile ManagementNextfind (command)

Last updated 4 years ago

chattr

chattr - change (extended) file attributes on a Linux file system

Man Page

Syntax

chattr [ -RVf ] [ -v version ] [ mode ] files...

Description

The format of a symbolic mode is +-=[acdeijstuADST].

The operator '+' causes the selected attributes to be added to the existing attributes of the files; '-' causes them to be removed; and '=' causes them to be the only attributes that the files have.

The letters 'acdeijstuADST' select the new attributes for the files:

append only (a), compressed (c), no dump (d), extent format (e), immutable (i), data journalling (j), secure deletion (s), no tail-merging (t), undeletable (u), no atime updates (A), synchronous directory updates (D), synchronous updates (S), and top of directory hierarchy (T).

The following attributes are read-only, and may be listed by lsattr(1) but not modified by chattr:

huge file (h), compression error (E), indexed directory (I), compression raw access (X), and compressed dirty file (Z).

lsattr

lsattr - list (extended) file attributes on a Linux second extended file system

Man Page

Syntax

lsattr [ -RVadv ] [ files...]

Options

Option

Description

-R

Recursively list attributes of directories and their contents.

-V

Display the program version.

-a

List all files in directories, including files that start with '.'.

-d

List directories like other files, rather than listing their contents.

-v

List the file's version/generation number.

removexattr

Remove extended attributes.

chattr(1): change file attribs on file system - Linux man page
Logo
lsattr(1): file attribs on EXT2 - Linux man page
Logo
removexattr(2) - Linux manual page