macOS-查看和开启APFS卷的碎片整理功能

查看和开启APFS卷的碎片整理功能

keywords: apfs defragmentation, apfs defrag

Usage: diskutil apfs defragment|defrag |
status|enable|disable
where = APFS Container DiskIdentifier
= APFS Volume DiskIdentifier
Manage defragmentation of the specified APFS Container or Volume. You can see
whether automatic defragmentation is enabled by specifying “status”. You can
set automatic defragmentation behavior by specifying “enable” or “disable”.
Ownership of the affected disks is required.
Example: diskutil apfs defragment disk5 enable
diskutil apfs defragment disk5s1 status

  • 查看自动碎片整理功能状态
1
diskutil apfs defragment disk5s1 status
  • 启用自动碎片整理功能
1
diskutil apfs defragment disk5 enable
  • 禁用自动碎片整理功能
1
diskutil apfs defragment disk5 disable

macOS-查看和开启APFS卷的碎片整理功能
https://dnacore.github.io/post/d7608214-2416-4351-b92a-b91f9ea15a7d.html
作者
DNACore
发布于
2019年11月5日
更新于
2024年10月16日
许可协议