mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-14 03:48:22 +00:00
Update cheatsheets
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
@@ -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`:
|
||||
|
||||
|
||||
21
tldr/linux/bcachefs-device
Normal file
21
tldr/linux/bcachefs-device
Normal 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}}`
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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
13
tldr/linux/xfs_repair
Normal 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}}`
|
||||
18
tldr/lsd
18
tldr/lsd
@@ -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
25
tldr/pulumi-about
Normal 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
25
tldr/pulumi-preview
Normal 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`
|
||||
Reference in New Issue
Block a user