sfdisk: add page (#13665)

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
Co-authored-by: Wiktor Perskawiec <git@spageektti.cc>
pull/28/head
Managor 2024-09-11 20:46:20 +03:00 committed by GitHub
parent 8293b6b113
commit a8d8537337
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 24 additions and 0 deletions

24
pages/linux/sfdisk.md Normal file
View File

@ -0,0 +1,24 @@
# 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}}`