From a8d8537337d2a316f876f591d9e691887666c5f1 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Wed, 11 Sep 2024 20:46:20 +0300 Subject: [PATCH] sfdisk: add page (#13665) Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> Co-authored-by: Wiktor Perskawiec --- pages/linux/sfdisk.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/linux/sfdisk.md diff --git a/pages/linux/sfdisk.md b/pages/linux/sfdisk.md new file mode 100644 index 000000000..d42846bbe --- /dev/null +++ b/pages/linux/sfdisk.md @@ -0,0 +1,24 @@ +# sfdisk + +> Display or manipulate a disk partition table. +> More information: . + +- 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}}`