Chattr
From DssWiki
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 a file.
On modern BSD systems (including Mac OS X) the equivalent command is chflags.
[edit] See also
- chown change file/directory ownership
- chmod change Unix access control atributes
- cacls MS-Windows NT filesystem ACL control utility
- attrib available on DOS and other systems
[edit] External links
[edit] Manual pages
|{{{3}}}|default}}|1|chattr|url}} chattr{{#if:{{Man/{{#if: |{{{3}}}|default}}|1|chattr|display_section}}|({{Man/{{#if: |{{{3}}}|default}}|1|chattr|display_section}})}}]{{#if:|: }}{{#if:{{#ifeq: |inline||{{Man/{{#if: |{{{3}}}|default}}|1|chattr|attrib}}}}| – {{#ifeq: |inline||{{Man/{{#if: |{{{3}}}|default}}|1|chattr|attrib}}}}}}
|Linux|default}}|1|chattr|url}} chattr{{#if:{{Man/{{#if:Linux |Linux|default}}|1|chattr|display_section}}|({{Man/{{#if:Linux |Linux|default}}|1|chattr|display_section}})}}]{{#if:|: }}{{#if:{{#ifeq: |inline||{{Man/{{#if:Linux |Linux|default}}|1|chattr|attrib}}}}| – {{#ifeq: |inline||{{Man/{{#if:Linux |Linux|default}}|1|chattr|attrib}}}}}}
|OpenBSD|default}}|1|chflags|url}} chflags{{#if:{{Man/{{#if:OpenBSD |OpenBSD|default}}|1|chflags|display_section}}|({{Man/{{#if:OpenBSD |OpenBSD|default}}|1|chflags|display_section}})}}]{{#if:|: }}{{#if:{{#ifeq: |inline||{{Man/{{#if:OpenBSD |OpenBSD|default}}|1|chflags|attrib}}}}| – {{#ifeq: |inline||{{Man/{{#if:OpenBSD |OpenBSD|default}}|1|chflags|attrib}}}}}}
|FreeBSD|default}}|1|chflags|url}} chflags{{#if:{{Man/{{#if:FreeBSD |FreeBSD|default}}|1|chflags|display_section}}|({{Man/{{#if:FreeBSD |FreeBSD|default}}|1|chflags|display_section}})}}]{{#if:|: }}{{#if:{{#ifeq: |inline||{{Man/{{#if:FreeBSD |FreeBSD|default}}|1|chflags|attrib}}}}| – {{#ifeq: |inline||{{Man/{{#if:FreeBSD |FreeBSD|default}}|1|chflags|attrib}}}}}}
{{#if: |
Unix command line programs and builtins (more) | |||
| File and file system management: | cat | chattr | cd | chmod | chown | chgrp | cksum | cmp | cp | du | df | file | fsck | fuser | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch | ||
| Process management: | at | chroot | crontab | exit | kill | killall | nice | pgrep | pidof | pkill | ps | sleep | time | top | wait | watch | ||
| User Management/Environment: | env | finger | id | 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 | pg | 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 | traceroute | Searching: find | grep | strings | Miscellaneous: banner | bc | cal | dd | man | size | yes | |
