6

The ext2/3/4 filesystem checker has two options that seem to be very similar, -p and -y.

Both seem to perform an automatic repair, but the manpage states that -p can exit when it encounters certain errors while for -y no such thing is mentioned. Is this the only difference?

10

There is a specific difference which when we read it twice might make more sense.

-p - Automatically repair the file system without any questions.
-y - Assume an answer of `yes' to all questions.

So fsck -p will try to fix the file system automatically without any user intervention. It is most likely to take decisions such as yes or no by itself.

However, fsck -y will just assume yes for all questions.

An example can be thought like,

If some changes need to be made in a partition, fsck -y will just go ahead and assume yes and make the changes.

However, fsck -p will take the correct decision which can be either yes or no.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.