From f2fc290d54af04eaf9634498f263798dfcb4c330 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Thu, 12 Sep 2024 00:16:33 +0000 Subject: [PATCH] Update cheatsheets --- tldr/linux/sfdisk | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tldr/linux/sfdisk diff --git a/tldr/linux/sfdisk b/tldr/linux/sfdisk new file mode 100644 index 00000000..9839d932 --- /dev/null +++ b/tldr/linux/sfdisk @@ -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: . + +- 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}}`