.\" Copyright (c) 2009-2010 Apple Inc. All rights reserved. .\" .Dd January 19, 2010 .Dt FSCK_EXFAT 8 .Os Darwin .Sh NAME .Nm fsck_exfat .Nd Verify and repair ExFAT file systems. .Sh SYNOPSIS .Nm .Fl q .Ar device ... .Nm .Op Fl f .Op Fl p .Op Fl y | n .Op Fl g | x .Op Fl S path_prefix .Op Fl d .Ar device ... .Sh DESCRIPTION .Pp The .Nm utility verifies and repairs .Tn ExFAT file systems. .Pp The first form of .Nm quickly checks the specified file systems to determine whether they were cleanly unmounted. .Pp The second form of .Nm checks the specified file systems and tries to repair all detected problems, requesting confirmation before making any changes. The default behavior is to always ask for confirmation of each change. Use the .Fl n or .Fl y options to override this default behavior. .Pp The .Ar device parameter(s) should be a path to a "raw" disk device (a character special device), such as .Pa /dev/rdisk1s1 . If you specify a "non-raw" path (a block special device) such as .Pa /dev/disk1s1 , or just the disk name such as .Pa disk1s1 , they will automatically be converted to the corresponding raw disk device .Pa ( /dev/rdisk1s1 ) . .Pp The options are as follows: .Bl -hang -offset indent .It Fl q Causes .Nm to quickly check whether the volume was unmounted cleanly. If the volume was unmounted cleanly, then the exit status is 0. If the volume was not unmounted cleanly, then the exit status will be non-zero. In either case, a message is printed to standard output describing whether the volume was clean or dirty. .It Fl f This option is ignored by .Nm and is present only for compatibility with programs that check other file system types for consistency. .It Fl p Preen the specified file systems. This option is ignored by .Nm and is present only for compatibility with programs that check other file system types for consistency. .It Fl y Causes .Nm to assume yes as the answer to all questions. It will attempt to repair all problems that are found. .It Fl n Causes .Nm to assume no as the answer to all questions. The device will be opened read-only, and no repairs will be made. .It Fl g Causes .Nm to produce its output in GUI-compatible form. Each message is printed as a tuple containing the kind of message, the message string, and number of parameters to the message string. Any parameters to the message string are printed on subsequent lines. The message string uses NSLog-like substitutions. This output format is used by applications such as Disk Utility. .It Fl x Causes .Nm to produce its output in an XML-like form. Each message is printed as a .Xr plist 5 containing a message type, verbosity, message number, and message string. The message string uses NSLog-like substitutions. For message strings that contain parameters, an array of dictionaries is output. This output format is used by applications such as Disk Utility. It may be used by other kinds of applications which wish to parse the output of .Nm . .It Fl d Causes .Nm to produce extra debugging output. This generally contains additional details about problems found. When writing bug reports for .Nm , it is usually helpful to include the output generated from this option. .It Fl S Ar directory Causes .Nm to create a shadow file containing all metadata read from the device. This functionality is intended for inclusion with bug reports regarding excpetional problems. One file is created for each checked device. A shadow file is created in the given .Ar directory . The shadow file's name will be shadow-diskXsY or shadow-fd, depends on the information given to .Nm . If this file already exists, .Nm will attempt to add a counter postfix to the name. For instance, given a .Ar directory of .Ar /tmp/ , a check of disk .Em /dev/rdisk3s1 would create the shadow file .Em /tmp/shadow-rdisk3s1 . Note that the shadow file captures all metadata as read from disk. In some cases with large volumes, .Nm will limit its cache size and re-read metadata from disk at different phases of the repair process. If the repair process has repaired the metadata, the shadow file will capture its state as last read from disk. For optimal debug value, the shadow file should be captured in conjunction with the .Fl n option. This file will be created as a sparse file, if it is on a file system supporting sparse files, such as .Em APFS . The shadow file does not capture file contents. However be aware .Em the shadow file includes details about all current and some past files. Extreme care should be taken before sharing the shadow file with others. .El .Sh SEE ALSO .Xr mount_exfat 8 , .Xr fsck 8 .Sh HISTORY The .Nm utility first appeared in Mac OS X 10.6.3.