<s>
The	O
system	O
utility	O
fsck	B-Device
(	O
file	B-Device
system	I-Device
consistency	I-Device
check	I-Device
)	O
is	O
a	O
tool	O
for	O
checking	O
the	O
consistency	O
of	O
a	O
file	B-Application
system	I-Application
in	O
Unix	B-Application
and	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
such	O
as	O
Linux	B-Application
,	O
macOS	B-Application
,	O
and	O
FreeBSD	B-Operating_System
.	O
</s>
<s>
The	O
equivalent	O
programs	O
on	O
MS-DOS	B-Application
and	O
Microsoft	B-Application
Windows	I-Application
are	O
CHKDSK	B-Device
and	O
SCANDISK	O
.	O
</s>
<s>
Generally	O
,	O
fsck	B-Device
is	O
run	O
either	O
automatically	O
at	O
boot	O
time	O
,	O
or	O
manually	O
by	O
the	O
system	B-Application
administrator	I-Application
.	O
</s>
<s>
The	O
command	B-Application
works	O
directly	O
on	O
data	O
structures	O
stored	O
on	O
disk	O
,	O
which	O
are	O
internal	O
and	O
specific	O
to	O
the	O
particular	O
file	B-Application
system	I-Application
in	O
use	O
-	O
so	O
an	O
fsck	B-Device
command	B-Application
tailored	O
to	O
the	O
file	B-Application
system	I-Application
is	O
generally	O
required	O
.	O
</s>
<s>
The	O
exact	O
behaviors	O
of	O
various	O
fsck	B-Device
implementations	O
vary	O
,	O
but	O
they	O
typically	O
follow	O
a	O
common	O
order	O
of	O
internal	O
operations	O
and	O
provide	O
a	O
common	O
command-line	O
interface	O
to	O
the	O
user	O
.	O
</s>
<s>
On	O
modern	O
systems	O
,	O
fsck	B-Device
simply	O
detects	O
the	O
type	O
of	O
filesystem	B-Application
and	O
calls	O
the	O
specialized	O
(	O
Linux	B-Application
)	O
or	O
(	O
BSD	O
,	O
macOS	B-Application
)	O
program	O
for	O
each	O
type	O
.	O
</s>
<s>
Most	O
fsck	B-Device
utilities	O
provide	O
options	O
for	O
either	O
interactively	O
repairing	O
damaged	O
file	B-Application
systems	I-Application
(	O
the	O
user	O
must	O
decide	O
how	O
to	O
fix	O
specific	O
problems	O
)	O
,	O
automatically	O
deciding	O
how	O
to	O
fix	O
specific	O
problems	O
(	O
so	O
the	O
user	O
does	O
not	O
have	O
to	O
answer	O
any	O
questions	O
)	O
,	O
or	O
reviewing	O
the	O
problems	O
that	O
need	O
to	O
be	O
resolved	O
on	O
a	O
file	B-Application
system	I-Application
without	O
actually	O
fixing	O
them	O
.	O
</s>
<s>
Partially	O
recovered	O
files	O
where	O
the	O
original	O
file	O
name	O
cannot	O
be	O
reconstructed	O
are	O
typically	O
recovered	O
to	O
a	O
"	O
lost+found	O
"	O
directory	O
that	O
is	O
stored	O
at	O
the	O
root	O
of	O
the	O
file	B-Application
system	I-Application
.	O
</s>
<s>
A	O
system	B-Application
administrator	I-Application
can	O
also	O
run	O
fsck	B-Device
manually	O
if	O
they	O
believe	O
there	O
is	O
a	O
problem	O
with	O
the	O
file	B-Application
system	I-Application
.	O
</s>
<s>
The	O
file	B-Application
system	I-Application
is	O
normally	O
checked	O
while	O
unmounted	O
,	O
mounted	O
read-only	O
,	O
or	O
with	O
the	O
system	O
in	O
a	O
special	O
maintenance	O
mode	O
.	O
</s>
<s>
As	O
boot	O
time	O
fsck	B-Device
is	O
expected	O
to	O
run	O
without	O
user	O
intervention	O
,	O
it	O
generally	O
defaults	O
to	O
not	O
perform	O
any	O
destructive	O
operations	O
.	O
</s>
<s>
Some	O
modern	O
file	B-Application
systems	I-Application
do	O
not	O
require	O
fsck	B-Device
to	O
be	O
at	O
boot	O
after	O
an	O
unclean	O
shutdown	O
.	O
</s>
<s>
XFS	B-Application
,	O
a	O
journaling	B-Application
file	I-Application
system	I-Application
.	O
</s>
<s>
It	O
has	O
a	O
dummy	O
fsck	B-Device
which	O
does	O
nothing	O
and	O
an	O
actual	O
xfs_repair	O
tool	O
to	O
be	O
run	O
when	O
problems	O
are	O
suspected	O
.	O
</s>
<s>
UFS2	B-Operating_System
file	B-Application
system	I-Application
in	O
FreeBSD	B-Operating_System
,	O
which	O
can	O
delay	O
the	O
check	O
to	O
background	O
if	O
soft	B-Application
updates	I-Application
are	O
enabled	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
it	O
is	O
usually	O
not	O
necessary	O
to	O
wait	O
for	O
fsck	B-Device
to	O
finish	O
before	O
accessing	O
the	O
disk	O
.	O
</s>
<s>
ZFS	B-Application
and	O
Btrfs	B-Operating_System
,	O
two	O
full	O
copy-on-write	B-Language
file	B-Application
systems	I-Application
.	O
</s>
<s>
They	O
also	O
provide	O
a	O
dummy	O
fsck	B-Device
.	O
</s>
<s>
btrfs-check	O
is	O
still	O
available	O
to	O
check	O
for	O
suspected	O
problems	O
in	O
filesystem	B-Application
structure	O
(	O
e.g.	O
</s>
<s>
Independent	O
of	O
checking	O
the	O
file	B-Application
system	I-Application
structure	O
,	O
modern	O
file	B-Application
systems	I-Application
may	O
offer	O
a	O
data	B-Error_Name
scrubbing	I-Error_Name
tool	O
to	O
check	O
for	O
silent	O
corruption	O
in	O
stored	O
data	O
against	O
a	O
mirror	O
or	O
a	O
checksum	B-Algorithm
.	O
</s>
<s>
fsck	B-Device
first	O
appeared	O
in	O
4.0BSD	O
of	O
1980	O
.	O
</s>
<s>
fsck	B-Device
is	O
not	O
defined	O
by	O
any	O
extant	O
standard	O
,	O
but	O
the	O
primitive	O
non-wrapper	O
form	O
is	O
present	O
in	O
the	O
1995	O
draft	O
Systems	O
Management	O
:	O
File	B-Application
System	I-Application
and	O
Scheduling	O
Utilities	O
(	O
FSSU	O
)	O
from	O
X/Open	O
.	O
</s>
<s>
The	O
severity	O
of	O
file	B-Application
system	I-Application
corruption	O
led	O
to	O
the	O
terms	O
"	O
fsck	B-Device
"	O
and	O
"	O
fscked	O
"	O
becoming	O
used	O
among	O
Unix	B-Application
system	I-Application
administrators	O
as	O
a	O
minced	O
oath	O
for	O
"	O
fuck	O
"	O
and	O
"	O
fucked	O
"	O
.	O
</s>
<s>
It	O
is	O
unclear	O
whether	O
this	O
usage	O
was	O
cause	O
or	O
effect	O
,	O
as	O
a	O
report	O
from	O
a	O
question	O
and	O
answer	O
session	O
at	O
USENIX	B-Operating_System
1998	O
claims	O
that	O
"	O
fsck	B-Device
"	O
originally	O
had	O
a	O
different	O
name	O
:	O
</s>
<s>
"	O
Go	O
fsck	B-Device
yourself	O
"	O
,	O
is	O
occasionally	O
used	O
online	O
as	O
an	O
injunction	O
to	O
a	O
person	O
to	O
go	O
and	O
correct	O
their	O
issue	O
(	O
attitude	O
,	O
ignorance	O
of	O
the	O
subject	O
matter	O
,	O
etc	O
.	O
)	O
</s>
<s>
-	O
in	O
the	O
same	O
way	O
that	O
running	O
fsck	B-Device
involves	O
fixing	O
fundamental	O
errors	O
.	O
</s>
<s>
The	O
following	O
example	O
checks	O
the	O
file	B-Application
system	I-Application
configured	O
to	O
be	O
mounted	O
on	O
/usr	O
partition	O
;	O
the	O
file	B-Application
system	I-Application
needs	O
to	O
be	O
unmounted	O
first	O
:	O
</s>
<s>
The	O
following	O
example	O
checks	O
the	O
Linux	B-Application
JFS	B-Application
file	I-Application
system	I-Application
on	O
a	O
mdadm	O
software	O
RAID	B-Architecture
device	O
:	O
</s>
