Fsck command

Fsck command . It is a very important Linux / Unix utility, it is used to check and repair file system errors. It is similar to utility

chkdsk on Windows operating systems . FSCK stands for File System Consistency Check and most of the time, it runs at boot time, but can also be manually started by a super user, if needed.

Summary

[ hide ]

  • 1 Use
  • 2 Syntax
  • 3 Sources
  • 4 External Links

Utilization

It can be used with 3 modes of operation,

1- Check for errors and let the user decide what to do with each error,

2- Check errors and make repairs automatically.

3- Check for errors and view the error, but do not make any repairs.

Syntax

We can use the FSCK command manually with the following syntax,

$ fsck unit options

The options that can be used with the fsck command are,

-p automatic repair (no questions asked)

-n Do not make changes to the file system.

-y Assume “yes” to all questions.

-c Checks for bad blocks and adds them to the badblock list

-f Force check even if file system is marked as clean

-v be verbose

-b superblock Use alternate superblock

-B block size Force block size when searching for a superblock

-j external_journal Sets the location of the journal file.

-l bad_blocks_file Add to the list of badblocks

-L bad_blocks_file Set badblocks list |}

 

Leave a Comment

Scroll to Top