1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 13:26:01 +02:00

parted: refresh (#5470)

This commit is contained in:
bl-ue 2021-03-19 10:10:13 -04:00 committed by GitHub
parent 2cf45c19cf
commit f2941ea685
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,15 +7,15 @@
`sudo parted --list`
- Start to manipulate disk partition:
- Start interactive mode with the specified disk selected:
`sudo parted {{/dev/sdX}}`
- Create a new partition table of label-type directly, label-type can be gpt, msdos etc:
- Create a new partition table of the specified label-type:
`sudo parted --script {{/dev/sdX}} mklabel {{gpt}}`
`sudo parted --script {{/dev/sdX}} mklabel {{aix|amiga|bsd|dvh|gpt|loop|mac|msdos|pc98|sun}}`
- Show disk partition information in interactive mode:
- Show partition information in interactive mode:
`print`
@ -23,14 +23,14 @@
`select {{/dev/sdX}}`
- Interactively create a 16GB partition with a given filesystem:
- Create a 16GB partition with the specified filesystem in interactive mode:
`mkpart {{primary|logical|extended}} {{filesystem}} {{0%}} {{16G}}`
`mkpart {{primary|logical|extended}} {{btrfs|ext2|ext3|ext4|fat16|fat32|hfs|hfs+|linux-swap|ntfs|reiserfs|udf|xfs}} {{0%}} {{16G}}`
- Resize partition size:
- Resize a partition in interactive mode:
`resizepart {{/dev/sdXN}} {{end_position_of_partition}}`
- Remove partition:
- Remove a partition in interactive mode:
`rm {{/dev/sdXN}}`