Update cheatsheets

This commit is contained in:
ivuorinen
2024-09-22 00:18:26 +00:00
parent 2ba5743c8f
commit 3081b6f11e
9 changed files with 111 additions and 21 deletions

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Trim a video from a given start time mm:ss to an end time mm2:ss2 (omit the -to flag to trim till the end):
`ffmpeg -ss {{mm:ss}} -to {{mm2:ss2}} -i {{path/to/input_video.mp4}} -codec copy {{path/to/output_video.mp4}}`
`ffmpeg -i {{path/to/input_video.mp4}} -ss {{mm:ss}} -to {{mm2:ss2}} -codec copy {{path/to/output_video.mp4}}`
- Convert AVI video to MP4. AAC Audio @ 128kbit, h264 Video @ CRF 23:

View File

@@ -6,7 +6,8 @@ source: https://github.com/tldr-pages/tldr.git
# bcachefs
> Manage `bcachefs` filesystems/devices.
> More information: <https://bcachefs.org/bcachefs-principles-of-operation.pdf>.
> Some subcommands such as `device` have their own usage documentation.
> More information: <https://bcachefs-docs.readthedocs.io/en/latest/index.html>.
- Format a partition with `bcachefs`:

View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# bcachefs device
> Manage devices within a running `bcachefs` filesystem.
> More information: <https://bcachefs-docs.readthedocs.io/en/latest/mgmt-devicemanagement.html>.
- Format and add a new device to an existing filesystem.:
`sudo bcachefs device add --label={{group}}.{{name}} {{path/to/mountpoint}} {{path/to/device}}`
- Migrate data off a device to prepare for removal:
`bcachefs device evacuate {{path/to/device}}`
- Permanently remove a device from a filesystem:
`bcachefs device remove {{path/to/device}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# ceph
> A unified storage system.
> More information: <https://ceph.io>.
> More information: <https://ceph.io/en>.
- Check cluster health status:

View File

@@ -6,15 +6,12 @@ source: https://github.com/tldr-pages/tldr.git
# firewall-cmd
> The firewalld command-line client.
> View and adapt the runtime or permanent firewall configuration state.
> More information: <https://firewalld.org/documentation/man-pages/firewall-cmd>.
- View the available firewall zones:
- View all available firewall zones and rules in their runtime configuration state:
`firewall-cmd --get-active-zones`
- View the rules which are currently applied:
`firewall-cmd --list-all`
`firewall-cmd --list-all-zones`
- Permanently move the interface into the block zone, effectively blocking all communication:
@@ -28,10 +25,18 @@ source: https://github.com/tldr-pages/tldr.git
`firewall-cmd --permanent --zone={{public}} --remove-service={{http}}`
- Permanently open two arbitrary ports in the specified zone:
- Permanently forward a port for incoming packets in the specified zone (like port 443 to 8443 when entering the `public` zone):
`firewall-cmd --permanent --zone={{public}} --add-port={{25565/tcp}} --add-port={{19132/udp}}`
`firewall-cmd --permanent --zone={{public}} --add-rich-rule='rule family="{{ipv4|ipv6}}" forward-port port="{{443}}" protocol="{{udp|tcp}}" to-port="{{8443}}"'`
- Reload firewalld to force rule changes to take effect:
- Reload firewalld to lose any runtime changes and force the permanent configuration to take effect immediately:
`firewall-cmd --reload`
- Save the runtime configuration state to the permanent configuration:
`firewall-cmd --runtime-to-permanent`
- Enable panic mode in case of Emergency. All traffic is dropped, any active connection will be terminated:
`firewall-cmd --panic-on`

13
tldr/linux/xfs_repair Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# xfs_repair
> Repair an XFS filesystem.
> More information: <https://manned.org/xfs_repair>.
- Repair a partition:
`sudo xfs_repair {{path/to/partition}}`

View File

@@ -17,26 +17,26 @@ source: https://github.com/tldr-pages/tldr.git
`lsd -a`
- List all files and directories with trailing `/` added to directory names:
- List files and directories with trailing `/` added to directory names:
`lsd -F`
- List all files and directories in long format (permissions, ownership, size, and modification date):
- List all files and directories in long format (permissions, ownership, size in human-readable format, and modification date):
`lsd -la`
`lsd -lha`
- List all files and directories in long format with size displayed using human-readable units (KiB, MiB, GiB):
`lsd -lh`
- List all files and directories in long format, sorted by size (descending):
- List files and directories in long format, sorted by size (descending):
`lsd -lS`
- List all files and directories in long format, sorted by modification date (oldest first):
- List files and directories in long format, sorted by modification date (oldest first):
`lsd -ltr`
- Only list directories:
`lsd -d {{*/}}`
- Recursively list all directories in a tree format:
`lsd --tree -d`

25
tldr/pulumi-about Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# pulumi about
> Print information about the Pulumi environment.
> More information: <https://www.pulumi.com/docs/iac/cli/commands/pulumi_about/>.
- Print information about the Pulumi environment:
`pulumi about`
- Print information about the Pulumi environment in JSON format:
`pulumi about --json`
- Print information about the Pulumi environment of a specific stack:
`pulumi about --stack {{stack_name}}`
- Display help:
`pulumi about --help`

25
tldr/pulumi-preview Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# pulumi preview
> Show a preview of updates to a stack's resources.
> More information: <https://www.pulumi.com/docs/iac/cli/commands/pulumi_preview/>.
- Show a preview of updates to a stack's resources:
`pulumi preview`
- Show a preview of updates to a stack's resources in JSON format:
`pulumi preview --json`
- Preview updates as a rich diff showing overall changes:
`pulumi preview --diff`
- Display help:
`pulumi preview --help`