What is e2fsck used for?

What is e2fsck used for?

e2fsck is used to examine ext2/ext3/ext4 filesystems for errors and fsck checks and can optionally repair a Linux filesystem; it is basically a front-end for a range of filesystem checkers (fsck. fstype for example fsck. ext3, fsck. sfx etc) offered under Linux.

What is difference between fsck and e2fsck?

fsck is just the original name. When they came out with new file systems they would need a specific tool for each one, efsck for ext, e2fsck for ext2, dosfsck, fsckvfat. So they made fsck the front end that just calls whichever is the appropriate tool. fsck is a wrapper for the filesystem-specific fsck.

What does e2fsck do when it discovers a problem?

If e2fsck discovers a problem which may require the system administrator to take additional corrective action, it will print a description of the problem and then exit with the value 4 logically or’ed into the exit code. This option does nothing at all; it is provided only for backwards compatibility. Print the timing statistics.

What is the exit code for e2fsck in Linux?

If e2fsck discovers a problem which may require the system administrator to take additional corrective action, e2fsck will print a description of the problem and then exit with the value 4 logically or’ed into the exit code. This option does nothing at all; it is provided only for backwards compatibility.

When to use e2fsck on ext3 / ext4 file system?

e2fsck is used to check the ext2/ext3/ext4 family of file systems. For ext3 and ext4 filesystems that use a journal, if the system has been shut down uncleanly without any errors, normally, after replaying the committed transactions in the journal, the file system should be marked as clean.

How to do e2fsck on a clean file system?

If you have a clean file system but you want to force the filesystem check then use the -f option as shown below. Using -C option, this option is used for file descriptor, where e2fsck will send the output, it is very useful if you are doing e2fsck from a shell script.