Name
fsck_hfs — stdin stdout - file -- opt --help --version
Synopsis
fsck_hfs [options] [devices]
The fsck_hfs command
validates a Macintosh HFS-formatted disk partition and, if requested,
repairs errors found on it. (Alternatively, you can run the diskutil command, or the graphical
application Disk Utility in the Utilities folder.) In general, unmount a
device before checking it, so no other programs are operating on it at
the same time:
➜sudo diskutil unmount /dev/disk1s2➜sudo fsck_hfs -f /dev/disk1s2** /dev/rdisk1s2 ** Checking Journaled HFS Plus volume. ** Checking Extents Overflow file. ** Checking Catalog file. ** Checking multi-linked files. ...
OS X includes more validation programs for other kinds of
filesystems. Run man -k fsck to see
a list.
Useful options
| Force a filesystem check, even if OS X says the filesystem doesn’t need it. |
| Do not fix errors, just report them. |
| Fix errors automatically (use only if you really know what you’re doing; if not, you can seriously mess up a filesystem). |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access