tldr/pages.zh/osx/fsck.md

22 lines
709 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# fsck
> 检查或修复文件系统的完整性,运行命令时应卸载文件系统。
> 它是一个包装器,包含 `fsck_hfs`, `fsck_apfs`, `fsck_msdos`, `fsck_exfat`, `fsck_udf` 作为可选。
> 更多信息:<https://ss64.com/osx/fsck.html>.
- 检查文件系统 /dev/sda报告损坏的块
`fsck {{/dev/sda}}`
- 仅当文件系统 /dev/sda 是干净的时才检查它,报告任何损坏的块并以交互方式让用户选择修复每个块:
`fsck -f {{/dev/sda}}`
- 仅当文件系统 /dev/sda 干净时才检查它,报告任何损坏的块并自动修复它们:
`fsck -fy {{/dev/sda}}`
- 检查文件系统 /dev/sda, 报告是否已完全卸载:
`fsck -q {{/dev/sda}}`