fsck_hfs − check and repair an HFS+ volume
fsck_hfs [options] device
fsck_hfs will check an HFS+ volume for errors, and optionally correct them. Run fsck_hfs without arguments for a full list of options.
Below is a summary of all the options that fsck_hfs accepts.
|
−q |
Do only a quick test to check if the file-system will mount properly. This is useful when you want to do a fast check to find out if the volume was unmounted cleanly. It returns a non non-zero exit value if the volume was not unmounted cleanly, otherwise an exit value of 0 is returned. | ||
|
−d |
Verbose output. This is useful for debugging when fsck_hfs cannot repair a corrupted HFS+ volume. | ||
|
−f |
Force fsck_hfs to check and repair journaled HFS+ file-system. When used with −p option, forces fsck_hfs to check ’clean’ file systems. | ||
|
−l |
Lock the file-system and perform a read-only check. This is useful when you want to check a mounted volume, without trying to repair it. |
−m MODE
Set permissions for the lost+found directory when created. It accepts an octal value that will be used to set the permission. fsck_hfs places orphaned files and directories in lost+found directory (located in the root directory). Default mode is 01777.
|
−p |
Preen the specified file-system. |
−c SIZE
Specify the internal cache size used by fsck_hfs. Bigger size can ensure better performance but can deadlock when used with −l option. It accepts size value as an argument, which can be a decimal, octal, or a hexadecimal number. Numbers ending with a ’k’, ’m’ or ’g’ are multiplied by 1024 (1K), 1048576 (1M) or 1073741824 (1G), respectively.
|
−r |
Rebuild the catalog file on the specified file-system. | ||
|
−y |
Always try to repair every corruption that is found. | ||
|
−n |
Never try to repair any corruption that is found. |
0:
Success quick test, file-system was cleanly unmounted.
3: File-system Dirty, no checks.
4: Writeable Root File-system was fixed.
8: Standard error exit.
If you find a bug please send an email describing the problem to hfs-support@tuxera.com.
fsck_hfs is part of the Tuxera HFS+ package.