<s>
is	O
the	O
command	B-Application
in	O
Linux	B-Application
that	O
allows	O
a	O
user	O
to	O
set	O
certain	O
attributes	B-Application
of	O
a	O
file	O
.	O
</s>
<s>
is	O
the	O
command	B-Application
that	O
displays	O
the	O
attributes	B-Application
of	O
a	O
file	O
.	O
</s>
<s>
Most	O
BSD-like	B-Operating_System
systems	I-Operating_System
,	O
including	O
macOS	B-Application
,	O
have	O
always	O
had	O
an	O
analogous	O
command	B-Application
to	O
set	O
the	O
attributes	B-Application
,	O
but	O
no	O
command	B-Application
specifically	O
meant	O
to	O
display	O
them	O
;	O
specific	O
options	O
to	O
the	O
command	B-Application
are	O
used	O
instead	O
.	O
</s>
<s>
The	O
chflags	B-Device
command	B-Application
first	O
appeared	O
in	O
4.4BSD	O
.	O
</s>
<s>
Solaris	B-Application
has	O
no	O
commands	O
specifically	O
meant	O
to	O
manipulate	O
them	O
.	O
</s>
<s>
Other	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
in	O
general	O
,	O
have	O
no	O
analogous	O
commands	O
.	O
</s>
<s>
The	O
similar-sounding	O
commands	O
(	O
from	O
HP-UX	B-Application
)	O
and	O
(	O
from	O
AIX	B-Application
)	O
exist	O
but	O
have	O
unrelated	O
functions	O
.	O
</s>
<s>
Among	O
other	O
things	O
,	O
the	O
command	B-Application
is	O
useful	O
to	O
make	O
files	O
immutable	O
so	O
that	O
password	O
files	O
and	O
certain	O
system	O
files	O
cannot	O
be	O
erased	O
during	O
software	O
upgrades	O
.	O
</s>
<s>
The	O
command	B-Application
line	O
tools	O
(	O
to	O
manipulate	O
attributes	B-Application
)	O
and	O
(	O
to	O
list	O
attributes	B-Application
)	O
were	O
originally	O
specific	O
to	O
the	O
Second	B-Application
Extended	I-Application
Filesystem	I-Application
family	O
(	O
ext2	B-Application
,	O
ext3	B-Application
,	O
ext4	B-Application
)	O
,	O
and	O
are	O
available	O
as	O
part	O
of	O
the	O
e2fsprogs	B-Application
package	O
.	O
</s>
<s>
However	O
,	O
the	O
functionality	O
has	O
since	O
been	O
extended	O
,	O
fully	O
or	O
partially	O
,	O
to	O
many	O
other	O
systems	O
,	O
including	O
XFS	B-Application
,	O
ReiserFS	B-Application
,	O
JFS	B-Application
and	O
OCFS2	B-Application
.	O
</s>
<s>
The	O
btrfs	B-Operating_System
file	O
system	O
includes	O
the	O
attribute	O
functionality	O
,	O
including	O
the	O
C	O
flag	O
,	O
which	O
turns	O
off	O
the	O
built-in	O
copy-on-write	O
(	O
CoW	O
)	O
feature	O
of	O
btrfs	B-Operating_System
due	O
to	O
slower	O
performance	O
associated	O
with	O
CoW	O
.	O
</s>
<s>
The	O
form	O
of	O
the	O
command	B-Application
is	O
:	O
</s>
<s>
The	O
form	O
of	O
the	O
command	B-Application
(	O
gnu	O
1.41.3	O
)	O
:	O
</s>
<s>
Some	O
attributes	B-Application
include	O
:	O
</s>
<s>
+	O
File	B-Application
attributes	I-Application
on	O
a	O
Linux	B-Application
file	O
system	O
according	O
to	O
the	O
chattr(1 )	O
Linux	B-Application
man	O
pageAttribute	O
flag	O
optionSemantics	O
and	O
rationaleNo	O
atime	O
updatesA+A	O
to	O
set-A	O
to	O
clearWhen	O
a	O
file	O
with	O
the	O
A	O
attribute	O
set	O
is	O
accessed	O
,	O
its	O
record	O
is	O
not	O
modified	O
.	O
</s>
<s>
This	O
avoids	O
a	O
certain	O
amount	O
of	O
disk	O
I/O	O
operations.Append	O
onlya+a	O
to	O
set-a	O
to	O
clearOnly	O
the	O
superuser	O
or	O
a	O
process	O
possessing	O
the	O
CAP_LINUX_IMMUTABLE	O
capability	O
can	O
set	O
or	O
clear	O
these	O
attributes.A	O
file	O
with	O
the	O
a	O
attribute	O
set	O
can	O
only	O
be	O
open	O
in	O
append	O
mode	O
for	O
writing.Compressedc	O
+c	O
to	O
set-c	O
to	O
clearThese	O
attributes	B-Application
are	O
not	O
honored	O
by	O
the	O
and	O
filesystems	O
as	O
implemented	O
in	O
the	O
current	O
mainline	O
Linux	B-Application
kernels.A	O
file	O
with	O
the	O
c	O
attribute	O
set	O
is	O
automatically	O
compressed	O
on	O
the	O
disk	O
by	O
the	O
kernel	O
.	O
</s>
<s>
A	O
write	O
to	O
this	O
file	O
compresses	O
data	O
before	O
storing	O
them	O
on	O
the	O
disk.No	O
Copy-on-Write	O
(	O
CoW	O
)	O
C+C	O
to	O
set-C	O
to	O
clearThese	O
attributes	B-Application
only	O
make	O
sense	O
for	O
Copy-on-Write	O
file-systems	O
such	O
as	O
.A	O
file	O
with	O
the	O
C	O
attribute	O
will	O
not	O
be	O
subject	O
to	O
Copy-on-Write	O
updates	O
.	O
</s>
<s>
This	O
is	O
equivalent	O
to	O
the	O
dirsync	O
mount	B-Device
option	I-Device
,	O
applied	O
to	O
a	O
subset	O
of	O
the	O
files.No	O
dumpd+d	O
to	O
set-d	O
to	O
clearA	O
file	O
with	O
the	O
d	O
attribute	O
set	O
is	O
not	O
candidate	O
for	O
backup	O
when	O
the	O
program	O
is	O
run.Compression	O
errorE	O
The	O
E	O
attribute	O
is	O
used	O
by	O
the	O
experimental	O
compression	O
patches	O
to	O
indicate	O
that	O
a	O
compressed	O
file	O
has	O
a	O
compression	O
error.Extent	O
formate	O
The	O
e	O
attribute	O
indicates	O
that	O
the	O
file	O
is	O
using	O
extents	B-Application
for	O
mapping	O
the	O
blocks	O
on	O
disk.Huge	O
fileh	O
The	O
h	O
attribute	O
indicates	O
the	O
file	O
is	O
storing	O
its	O
blocks	O
in	O
units	O
of	O
the	O
filesystem	O
blocksize	O
instead	O
of	O
in	O
units	O
of	O
sectors	O
.	O
</s>
<s>
When	O
the	O
filesystem	O
is	O
mounted	O
with	O
the	O
"	O
data	O
=	O
journal	O
"	O
option	O
all	O
file	O
data	O
is	O
already	O
journaled	B-Application
,	O
so	O
this	O
attribute	O
has	O
no	O
effect.Secure	O
deletions+s	O
to	O
set-s	O
to	O
clearThis	O
attribute	O
is	O
not	O
honored	O
by	O
the	O
filesystem	O
as	O
implemented	O
in	O
the	O
current	O
mainline	O
Linux	B-Application
kernels	O
as	O
reported	O
in	O
Bug	O
#17872	O
.When	O
a	O
file	O
with	O
the	O
s	O
attribute	O
set	O
is	O
deleted	O
,	O
its	O
blocks	O
are	O
zeroed	O
and	O
written	O
back	O
to	O
the	O
disk.Synchronous	O
updatesS+S	O
to	O
set-S	O
to	O
clearWhen	O
a	O
file	O
with	O
the	O
S	O
attribute	O
set	O
is	O
modified	O
,	O
the	O
changes	O
are	O
written	O
synchronously	O
on	O
the	O
disk	O
;	O
this	O
is	O
equivalent	O
to	O
the	O
'	O
sync	O
 '	O
mount	B-Device
option	I-Device
applied	O
to	O
a	O
subset	O
of	O
the	O
files	O
.	O
</s>
<s>
This	O
is	O
equivalent	O
to	O
the	O
sync	O
mount	B-Device
option	I-Device
,	O
applied	O
to	O
a	O
subset	O
of	O
the	O
files.Top	O
of	O
directory	O
hierarchyT+T	O
to	O
set-T	O
to	O
clearA	O
directory	O
with	O
the	O
T	O
attribute	O
will	O
be	O
deemed	O
to	O
be	O
the	O
top	O
of	O
directory	O
hierarchies	O
for	O
the	O
purposes	O
of	O
the	O
Orlov	B-Application
block	I-Application
allocator	I-Application
.	O
</s>
<s>
For	O
directories	O
where	O
this	O
attribute	O
is	O
not	O
set	O
,	O
the	O
Orlov	B-Application
block	I-Application
allocator	I-Application
will	O
try	O
to	O
group	O
subdirectories	O
closer	O
together	O
where	O
possible.No	O
tail-mergingt	O
+t	O
to	O
set-t	O
to	O
clearFor	O
those	O
filesystems	O
that	O
support	O
tail-merging	B-Application
,	O
a	O
file	O
with	O
the	O
t	O
attribute	O
will	O
not	O
have	O
a	O
partial	O
block	O
fragment	O
at	O
the	O
end	O
of	O
the	O
file	O
merged	O
with	O
other	O
files	O
.	O
</s>
<s>
This	O
is	O
necessary	O
for	O
applications	O
such	O
as	O
LILO	B-Application
,	O
which	O
reads	O
the	O
filesystem	O
directly	O
and	O
does	O
n't	O
understand	O
tail-merged	O
files.Undeletableu	O
+u	O
to	O
set-u	O
to	O
clearWhen	O
a	O
file	O
with	O
the	O
u	O
attribute	O
set	O
is	O
deleted	O
,	O
its	O
contents	O
are	O
saved	O
.	O
</s>
