When your hard drive starts to fail, Disk Utility offers some useful disk repair tools. But if they don’t get it done for you, you might want to turn to one of the big guns: fsck.
fsck
, which stands for “File System Consistency Check,” is a command-line tool that reviews and repairs the underlying structure of a hard drive. And while we all hope we never have to use it, here’s a brief introduction into its functionality.Note: the
fsck
tool in Mac is the same as the one found in Linux. This article is written with a focus on Mac’s user interface.View and Download Apple Mac OS X Server Command-Line administration manual online. Command-Line Administration For Version 10.3 or Later. Mac OS X Server Command-Line Software pdf manual download. Also for: Mac os x server. An A-Z Index of the Apple macOS command line (OS X. Open files m man Help manual mdfind Spotlight search mdls List the metadata. “Mac OS X is a rock-solid. Mar 10, 2014 At the command-line level, most documentation comes in the form of man pages (short for manual). Man pages provide reference information for many shell commands, programs, and POSIX-level concepts. The manual page manpages describes the organization of manual, and the format and syntax of individual man pages.
Finding the Right Disk
![Line Line](/uploads/1/2/4/6/124629259/233267181.jpg)
- An A-Z Index of the Apple macOS command line (OS X bash). Reset the Launch Services database lsbom List a bill of materials file lsof List open files m man Help manual mdfind Spotlight search mdls List the metadata attributes for a specified file mdutil Manage Spotlight metadata store. “Mac OS X is a rock-solid system that's beautifully.
- I am looking for a command line system administration reference or manual for Mac OS X. Specifically, I am interested in hard disk management, partition management. I was unable to achieve what I needed by using DiskUtil. Or at least my perception is such. Regardless, I would like to explore the disk management from the UNIX command line.
Before you can run fsck, you’ll need to find the device node and identifier of the disk you want to target. We’ll use Terminal’s
diskutil
Mac cinema display manual. command to accomplish that.1. Open Terminal (/Applications/Utilities/Terminal.app)
2. Type the following command, then press “Enter.”
3. This will produce a list of all the currently connect drives, both mounted and unmounted.
4. Locate the disk you want to run
fsck
on and find its device identifier. It will look like /dev/disk1
, and you’ll find this information along the left margin of the Terminal window. Write this information down somewhere since you’ll need it in the next steps.Running fsck from Single User Mode
fsck is a powerful utility, but macOS won’t let you run it from inside the operating system. You might think you can run fsck on a non-booting disk, but you’d be wrong: fsck is basically non-functional while in macOS’s userland. You’ll need to reboot into Single User mode, which is a stripped-down, text-only, superuser interface for macOS.
1. Restart your computer.
2. Hold down “Command + S” while your computer restarts. You can release the keys once you see white text start to appear on the startup screen.
3. Some white text will scroll by quickly. When it stops, you’ll see a command prompt at the bottom of the screen that says
root#
.If the text stops scrolling but you don’t see this prompt, press the “Enter” key once to reveal it.
4. To repair the boot disk, type in the following command, then press “Enter.”
This runs
fsck
with the -f
flag which forces it to check journaled file systems like HFS+, as well as the -y
flag, which automatically says “yes” to any prompts that fsck might encounter. Keep in mind that the -y
flag can be a little dangerous: as the fsck’s man page points out, “this should be used with great caution, as this is a free license to continue after essentially unlimited trouble has been encountered.”5. You can also use fsck to repair non-boot disks, but you’ll need to know the filesystem type. For example, if I wanted to run
fsck
on “/dev/disk2.” I might use the following command:That command will run the HFS sub-version of fsck on that drive. Other available filesystems include
fsck_msdos
, which runs on FAT file systems; fsck_exfat
, which examines ExFAT filesystems; and fsck_udf
, which looks at UDF file systems.4. fsck will check the file system and attempt to repair any damage that it finds. If it finds no damage, it will exit with “OK.”
5. When fsck is finished checking and repairing the filesystem, type
reboot
into the command prompt and press “Enter.”Conclusion
fsck on the Mac isn’t as powerful as fsck on Linux, but it can still be a lifesaver if you end up with a corrupted boot disk or damaged hard drive.
To use any of these key combinations, press and hold the keys immediately after pressing the power button to turn on your Mac, or immediately after your Mac begins to restart. Keep holding until the described behavior occurs.
If your Mac is using a firmware password, all of these key combinations are disabled, except as noted below.
Command (⌘)-R: Start up from the built-in macOS Recovery system. Or use Option-Command-R or Shift-Option-Command-R to start up from macOS Recovery over the Internet. macOS Recovery installs different versions of macOS, depending on the key combination you use while starting up. If your Mac is using a firmware password, you're asked to enter the password.
Option (⌥): Start up to Startup Manager, which allows you to choose other startup disks or volumes, if available. If your Mac is using a firmware password, you're asked to enter the password.
Option-Command-P-R:Reset NVRAM or PRAM. If your Mac is using a firmware password, it ignores this key combination or starts up from macOS Recovery.
Shift (⇧): Start up in safe mode.
D: Start up from the built-in Apple Hardware Test or Apple Diagnostics utility, depending on your Mac model. Or use Option-Dto start up from this utility over the Internet.
N: Start up from a NetBoot server, if your Mac supports network startup volumes. To use the default boot image on the server, hold down Option-N instead.
Command-S: Start up in single-user mode. This key combination requires macOS High Sierra or earlier.
Mac Os Command Line Manual Ip
T: Start up in target disk mode.
Command-V: Start up in verbose mode.
Eject (⏏) or F12 or mouse button or trackpad button: Eject removable media, such as an optical disc.
Learn more
Mac Os Command Line Manual Free
- Learn what to do if your Mac doesn't turn on.
- Learn about Mac keyboard shortcuts that you can use after your Mac has started up.