mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-05 18:44:32 +00:00
Update cheatsheets
This commit is contained in:
29
tldr/linux/sfdisk
Normal file
29
tldr/linux/sfdisk
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# sfdisk
|
||||
|
||||
> Display or manipulate a disk partition table.
|
||||
> More information: <https://manned.org/sfdisk>.
|
||||
|
||||
- Back up the partition layout to a file:
|
||||
|
||||
`sudo sfdisk {{-d|--dump}} {{path/to/device}} > {{path/to/file.dump}}`
|
||||
|
||||
- Restore a partition layout:
|
||||
|
||||
`sudo sfdisk {{path/to/device}} < {{path/to/file.dump}}`
|
||||
|
||||
- Set the type of a partition:
|
||||
|
||||
`sfdisk --part-type {{path/to/device}}} {{partition_number}} {{swap}}`
|
||||
|
||||
- Delete a partition:
|
||||
|
||||
`sfdisk --delete {{path/to/device}} {{partition_number}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`sfdisk {{-h|--help}}`
|
||||
Reference in New Issue
Block a user