Update cheatsheets

This commit is contained in:
ivuorinen
2025-01-06 00:18:31 +00:00
parent c41e4ca75d
commit b7f757ba3c
10 changed files with 113 additions and 29 deletions

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# audit2allow
> Create an SELinux local policy module to allow rules based on denied operations found in logs.
> Note: Use audit2allow with caution—always review the generated policy before applying it, as it may allow excessive access.
> Note: Use audit2allow with caution. Always review the generated policy before applying it, as it may allow excessive access.
> More information: <https://manned.org/audit2allow>.
- Generate a local policy to allow access for all denied services:

View File

@@ -6,37 +6,21 @@ source: https://github.com/tldr-pages/tldr.git
# parted
> A partition manipulation program.
> See also: `partprobe`.
> See also: `parted-interactive`, `partprobe`.
> More information: <https://www.gnu.org/software/parted/parted.html>.
- List partitions on all block devices:
`sudo parted --list`
- Create a new partition table of the specified label-type:
`sudo parted {{/dev/sdX}} --script mklabel {{aix|amiga|bsd|dvh|gpt|loop|mac|msdos|pc98|sun}}`
- Create a new `gpt` partition table with a 500MiB boot partition and give the rest for the system partition:
`sudo parted {{/dev/sdX}} --script mklabel gpt mkpart primary 0% 500MiB mkpart primary 500MiB 100%`
- 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}}`

View File

@@ -0,0 +1,34 @@
---
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>.
- Start interactive mode with the specified disk selected:
`sudo parted {{/dev/sdX}}`
- 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}}`