chattr

Change attributes of files or directories. More information: <https://manned.org/chattr>.

Install

All systems
curl cmd.cat/chattr.sh
Debian Debian
apt-get install e2fsprogs
Ubuntu
apt-get install e2fsprogs
Alpine
apk add e2fsprogs
Arch Arch Linux
pacman -S e2fsprogs
image/svg+xml Kali Linux
apt-get install e2fsprogs
CentOS
yum install e2fsprogs
Fedora
dnf install e2fsprogs
Windows (WSL2)
sudo apt-get update sudo apt-get install e2fsprogs
OS X
brew install e2fsprogs
Raspbian
apt-get install e2fsprogs
Docker
docker run cmd.cat/chattr chattr powered by Commando

Change attributes of files or directories. More information: <https://manned.org/chattr>.

  • Make a file or directory immutable to changes and deletion, even by superuser:
    chattr +i path/to/file_or_directory
  • Make a file or directory mutable:
    chattr -i path/to/file_or_directory
  • Recursively make an entire directory and contents immutable:
    chattr -R +i path/to/directory

© tl;dr; authors and contributors