Checking and Repairing Filesystems with fsck
The fsck program, which stands for File System Consistency checK, is the equivalent of Microsoft ScanDisk and other disk utilities, at least as far as its role in the boot process and its interactive nature go. Its purpose is primarily to run at boot time just before mounting the filesystems out of /etc/fstab, and to make sure that all the filesystems are “clean” and eligible for mounting. This is the “preen” mode that is called with the -p option. But it also exists to repair any inconsistencies that it finds and to clean filesystems that have not been marked “clean” by a proper shutdown method.
The most likely place you'll encounter fsck is at boot time, no matter what role it's going to play in ...
Get FreeBSD® Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.