Files
tldr/pages.zh/linux/blkdiscard.md
2024-06-11 10:17:57 +05:30

17 lines
404 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# blkdiscard
> 丢弃存储设备上的设备扇区。对 SSD 有用。
> 更多信息:<https://manned.org/blkdiscard>.
- 丢弃设备上的所有扇区,删除所有数据:
`blkdiscard {{/dev/设备名}}`
- 安全地丢弃设备上的所有块,删除所有数据:
`blkdiscard --secure {{/dev/设备名}}`
- 丢弃设备的前 100 MB
`blkdiscard --length {{100MB}} {{/dev/设备名}}`