mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-15 04:48:40 +00:00
Update cheatsheets
This commit is contained in:
21
tldr/elasticsearch-saml-metadata
Normal file
21
tldr/elasticsearch-saml-metadata
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# elasticsearch-saml-metadata
|
||||
|
||||
> Generate SAML Service Provider metadata for configuring a SAML Identity Provider.
|
||||
> More information: <https://www.elastic.co/guide/en/elasticsearch/reference/current/saml-metadata.html>.
|
||||
|
||||
- Generate SAML metadata for a specific realm and print it to `stdout`:
|
||||
|
||||
`elasticsearch-saml-metadata --realm {{realm_name}}`
|
||||
|
||||
- Generate SAML metadata and write it to a specific file:
|
||||
|
||||
`elasticsearch-saml-metadata --realm {{realm_name}} --out {{path/to/file.xml}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`elasticsearch-saml-metadata {{[-h|--help]}}`
|
||||
21
tldr/linux/bindfs
Normal file
21
tldr/linux/bindfs
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# bindfs
|
||||
|
||||
> Mount a directory elsewhere with different permissions.
|
||||
> More information: <https://bindfs.org/docs/bindfs.1.html>.
|
||||
|
||||
- Mount a directory with same permissions:
|
||||
|
||||
`sudo bindfs {{path/to/directory}} {{path/to/mount_point}}`
|
||||
|
||||
- Map filesystem objects owned by `user1` to be owned by `user2` (also applies in reverse to newly created files):
|
||||
|
||||
`sudo bindfs --map={{user1}}/{{user2}} {{path/to/directory}} {{path/to/mount_point}}`
|
||||
|
||||
- Unmount a directory:
|
||||
|
||||
`sudo umount {{path/to/mount_point}}`
|
||||
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Check what program has a specific file open:
|
||||
|
||||
`lsfd {{[-Q|--filter]}} "NAME == '{{/path/to/file}}'"`
|
||||
`lsfd {{[-Q|--filter]}} "NAME == '{{path/to/file}}'"`
|
||||
|
||||
- List open IPv4 or IPv6 sockets:
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Defaults to `raid1`, which specifies 2 copies of a data block spread across 2 different devices.
|
||||
> More information: <https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html>.
|
||||
|
||||
- Create a Btrfs filesystem on an empty partition:
|
||||
|
||||
`sudo mkfs.btrfs {{/dev/sdXY}}`
|
||||
|
||||
- Create a btrfs filesystem on a single device:
|
||||
|
||||
`sudo mkfs.btrfs {{[-m|--metadata]}} single {{[-d|--data]}} single {{/dev/sdX}}`
|
||||
|
||||
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Monitor bandwidth on multiple devices:
|
||||
|
||||
`sudo nethogs {{device1}} {{device2}}`
|
||||
`sudo nethogs {{device1 device2 ...}}`
|
||||
|
||||
- Specify refresh rate:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# parted
|
||||
|
||||
> A partition manipulation program.
|
||||
> See also: `parted-interactive`, `partprobe`.
|
||||
> See also: `parted.interactive`, `partprobe`.
|
||||
> More information: <https://www.gnu.org/software/parted/manual/html_node/Invoking-Parted.html>.
|
||||
|
||||
- List partitions on all block devices:
|
||||
|
||||
42
tldr/linux/parted.interactive
Normal file
42
tldr/linux/parted.interactive
Normal 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: `parted`, `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 (`GPT` partition table):
|
||||
|
||||
`mkpart {{partition_name}} {{btrfs|ext2|ext3|ext4|fat16|fat32|hfs|hfs+|linux-swap|ntfs|reiserfs|udf|xfs}} {{0%}} {{16G}}`
|
||||
|
||||
- Create a 16 GB partition with the specified filesystem in interactive mode (`MBR` partition table):
|
||||
|
||||
`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}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`?`
|
||||
21
tldr/linux/pct-exec
Normal file
21
tldr/linux/pct-exec
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pct exec
|
||||
|
||||
> Launch a command inside a specified container.
|
||||
> More information: <https://pve.proxmox.com/pve-docs/pct.1.html>.
|
||||
|
||||
- Launch a command in a container:
|
||||
|
||||
`pct {{[ex|exec]}} {{100}} {{command}}`
|
||||
|
||||
- Open a bash shell in a container:
|
||||
|
||||
`pct {{[ex|exec]}} {{100}} bash`
|
||||
|
||||
- Pass arguments to the command:
|
||||
|
||||
`pct {{[ex|exec]}} {{100}} -- {{command}} {{arguments}}`
|
||||
@@ -15,12 +15,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Repair the filesystem data structures of a volume:
|
||||
|
||||
`diskutil repairVolume {{/dev/disk_device}}`
|
||||
`diskutil repairVolume {{/dev/disk}}`
|
||||
|
||||
- Unmount a volume:
|
||||
|
||||
`diskutil unmountDisk {{/dev/disk_device}}`
|
||||
`diskutil unmountDisk {{/dev/disk}}`
|
||||
|
||||
- Eject a CD/DVD (unmount first):
|
||||
|
||||
`diskutil eject {{/dev/disk_device1}}`
|
||||
`diskutil eject {{/dev/diskX}}`
|
||||
|
||||
Reference in New Issue
Block a user