Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

42
linux/parted Normal file
View File

@@ -0,0 +1,42 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# parted
> A partition manipulation program.
> See also: `partprobe`.
> More information: <https://www.gnu.org/software/parted/parted.html>.
- List partitions on all block devices:
`sudo parted --list`
- Start interactive mode with the specified disk selected:
`sudo parted {{/dev/sdX}}`
- Create a new partition table of the specified label-type:
`sudo parted --script {{/dev/sdX}} mklabel {{aix|amiga|bsd|dvh|gpt|loop|mac|msdos|pc98|sun}}`
- Show partition information in interactive mode:
`print`
- Select a disk in interactive mode:
`select {{/dev/sdX}}`
- Create a 16 GB partition with the specified filesystem in interactive mode:
`mkpart {{primary|logical|extended}} {{btrfs|ext2|ext3|ext4|fat16|fat32|hfs|hfs+|linux-swap|ntfs|reiserfs|udf|xfs}} {{0%}} {{16G}}`
- Resize a partition in interactive mode:
`resizepart {{/dev/sdXN}} {{end_position_of_partition}}`
- Remove a partition in interactive mode:
`rm {{/dev/sdXN}}`