Chattr
From Wikipedia, the free encyclopedia
| This article or section includes a list of references or external links, but its sources remain unclear because it lacks in-text citations. You can improve this article by introducing more precise citations. |
chattr is a UNIX program that allows a user to set certain attributes to a file. Mostly chattr is used to make files immutable so that password files and certain system files cannot be erased during software upgrades.
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 (the superuser can't erase or write on the file, but he or she can set or unset the 'i' attribute).
On modern BSD systems (including Mac OS X) the equivalent command is chflags.
lsattrview file attributeschownchange file/directory ownershipchmodchange Unix access control attributescaclsMS-Windows NT filesystem ACL control utilityattribavailable on DOS and other systems
- – Linux man page
- – Linux man page on usr-share-man.org
- – OpenBSD General Commands Manual
- – FreeBSD General Commands Manual
|
|
|
|---|---|
| File and file system management | alias · cat · chattr · cd · chmod · chown · chgrp · cksum · cmp · cp · du · df · file · fsck · fuser · ln · ls · lsattr · lsof · mkdir · mount · mv · pwd · rm · rmdir · split · touch |
| Process management | at · chroot · crontab · exit · kill · killall · nice · pgrep · pidof · pkill · ps · pstree · sleep · time · top · wait · watch |
| User management/environment | env · finger · id · logname · mesg · passwd · su · sudo · uname · uptime · w · wall · who · whoami · write |
| Text processing | awk · comm · cut · ed · ex · fmt · head · iconv · join · less · more · paste · sed · sort · tac · tail · tr · uniq · wc · xargs |
| Shell programming | basename · echo · expr · false · printf · test · true · unset |
| Printing: lp · Communications: inetd · netstat · ping · rlogin · nc · traceroute · Searching: find · grep · strings · Miscellaneous: banner · bc · cal · dd · man · size · yes | |