Disk Utility - one of the standard system applications OS X. A very useful thing for working with disks (both external and installed in the computer). But not everyone knows that in addition to the graphical part of the utility, it is possible to control it from the console with advanced features. This is what we will talk.
Say at once that if you are an inexperienced user and not familiar with the terminal, it is better to perform the same action all the GUI utilities. Also, you must have administrator rights on account of the under which you will run the terminal, or use "sudo" command.
Check Disk from the command line OS X
volume test will learn about the Disk integrity and determine it needs to be repaired or not. To do this, use the following command:
diskutil verifyVolume [identifikator_diska]
For example, the default disk, use the command:
diskutil verifyvolume /
If you want to check all mounted drives on the system, you can use the following command:
diskutil verifyvolume / Volumes / ExternalBackups /
In the same way as it happens in the GUI Disk Utility, the verification process may take some time. Upon completion you will be informed that the test was successful, and therefore nothing to repair, in this case do not have to.
Worse, if the error still appears: "The volume Macintosh HD was found corrupt and needs to be repaired"
Restoring a disk using the command line in OS X
Well, the system encourages us to repair the disk. We follow the advice and go back to the terminal. Our team is a little change and become like this:
diskutil repairvolume /
Accordingly, the same as we do for other connected drives:
diskutil repairvolume / Volumes / ExternalBackups /
Note that the process may take a long time, and better yet he goes, no other transactions to commit, waiting for the end. As a general rule, using the correction drive is solved most of the problems associated with it.
If in the course of recovery disc as errors occur, what disk utility will certainly let you know you can try to recover it. Do not forget to copy all the necessary information!
And you resort to the help of Disk Utility? How often did you have a disk problem? Tell us about it in the comments!