Update cheatsheets

This commit is contained in:
ivuorinen
2024-06-19 00:14:24 +00:00
parent 61d2ca878b
commit 22990a1ad7
32 changed files with 118 additions and 47 deletions

38
tldr/cypher-shell Normal file
View File

@@ -0,0 +1,38 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# cypher-shell
> Open an interactive session and run Cypher queries against a Neo4j instance.
> See also: `neo4j-admin`, `mysql`.
> More information: <https://neo4j.com/docs/operations-manual/current/tools/cypher-shell/>.
- Connect to a local instance on the default port (`neo4j://localhost:7687`):
`cypher-shell`
- Connect to a remote instance:
`cypher-shell --address neo4j://{{host}}:{{port}}`
- Connect and supply security credentials:
`cypher-shell --username {{username}} --password {{password}}`
- Connect to a specific database:
`cypher-shell --database {{database_name}}`
- Execute Cypher statements in a file and close:
`cypher-shell --file {{path/to/file.cypher}}`
- Enable logging to a file:
`cypher-shell --log {{path/to/file.log}}`
- Display help:
`cypher-shell --help`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# chrt
> Manipulate the real-time attributes of a process.
> More information: <https://man7.org/linux/man-pages/man1/chrt.1.html>.
> More information: <https://manned.org/chrt>.
- Display attributes of a process:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Replay undo logs for an ext2/ext3/ext4 filesystem.
> This can be used to undo a failed operation by an e2fsprogs program.
> More information: <https://man7.org/linux/man-pages/man8/e2undo.8.html>.
> More information: <https://manned.org/e2undo>.
- Display information about a specific undo file:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# ethtool
> Display and modify Network Interface Controller (NIC) parameters.
> More information: <http://man7.org/linux/man-pages/man8/ethtool.8.html>.
> More information: <http://manned.org/ethtool>.
- Display the current settings for an interface:

37
tldr/linux/hyprpm Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# hyprpm
> Control plugins for the Hyprland Wayland compositor.
> More information: <https://wiki.hyprland.org/Plugins/Using-Plugins/#hyprpm>.
- Add a plugin:
`hyprpm add {{git_url}}`
- Remove a plugin:
`hyprpm remove {{git_url|plugin_name}}`
- Enable a plugin:
`hyprpm enable {{plugin_name}}`
- Disable a plugin:
`hyprpm disable {{plugin_name}}`
- Update and check all plugins:
`hyprpm update`
- Force an operation:
`hyprpm {{-f|--force}} {{operation}}`
- List all installed plugins:
`hyprpm list`

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Show/manipulate routing, devices, policy routing and tunnels.
> Some subcommands such as `ip address` have their own usage documentation.
> More information: <https://www.man7.org/linux/man-pages/man8/ip.8.html>.
> More information: <https://www.manned.org/ip.8>.
- List interfaces with detailed info:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# ip link
> Manage network interfaces.
> More information: <https://man7.org/linux/man-pages/man8/ip-link.8.html>.
> More information: <https://manned.org/ip-link>.
- Show information about all network interfaces:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# ip rule
> IP routing policy database management.
> More information: <https://man7.org/linux/man-pages/man8/ip-rule.8.html>.
> More information: <https://manned.org/ip-rule>.
- Display the routing policy:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# lslogins
> Show information about users on a Linux system.
> More information: <https://man7.org/linux/man-pages/man1/lslogins.1.html>.
> More information: <https://manned.org/lslogins>.
- Display users in the system:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# lsns
> List information about all namespaces or about the specified namespace.
> More information: <https://man7.org/linux/man-pages/man8/lsns.8.html>.
> More information: <https://manned.org/lsns>.
- List all namespaces:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Create a logical volume in an existing volume group. A volume group is a collection of logical and physical volumes.
> See also: `lvm`.
> More information: <https://man7.org/linux/man-pages/man8/lvcreate.8.html>.
> More information: <https://manned.org/lvcreate>.
- Create a logical volume of 10 gigabytes in the volume group vg1:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Display information about Logical Volume Manager (LVM) logical volumes.
> See also: `lvm`.
> More information: <https://man7.org/linux/man-pages/man8/lvdisplay.8.html>.
> More information: <https://manned.org/lvdisplay>.
- Display information about all logical volumes:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# lvm
> Manage physical volumes, volume groups, and logical volumes using the Logical Volume Manager (LVM) interactive shell.
> More information: <https://man7.org/linux/man-pages/man8/lvm.8.html>.
> More information: <https://manned.org/lvm>.
- Start the Logical Volume Manager interactive shell:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Reduce the size of a logical volume.
> See also: `lvm`.
> More information: <https://man7.org/linux/man-pages/man8/lvreduce.8.html>.
> More information: <https://manned.org/lvreduce>.
- Reduce a volume's size to 120 GB:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Change the size of a logical volume.
> See also: `lvm`.
> More information: <https://man7.org/linux/man-pages/man8/lvresize.8.html>.
> More information: <https://manned.org/lvresize>.
- Change the size of a logical volume to 120 GB:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Display information about logical volumes.
> See also: `lvm`.
> More information: <https://man7.org/linux/man-pages/man8/lvs.8.html>.
> More information: <https://manned.org/lvs>.
- Display information about logical volumes:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# mandb
> Manage the pre-formatted manual page database.
> More information: <https://man7.org/linux/man-pages/man8/mandb.8.html>.
> More information: <https://manned.org/mandb>.
- Purge and process manual pages:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# numactl
> Control NUMA policy for processes or shared memory.
> More information: <https://man7.org/linux/man-pages/man8/numactl.8.html>.
> More information: <https://manned.org/numactl>.
- Run a command on node 0 with memory allocated on node 0 and 1:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# partx
> Parse a partition table and tell the kernel about it.
> More information: <https://man7.org/linux/man-pages/man8/partx.8.html>.
> More information: <https://manned.org/partx>.
- List the partitions on a block device or disk image:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# man
> Format and display manual pages.
> More information: <https://www.man7.org/linux/man-pages/man1/man.1.html>.
> More information: <https://www.manned.org/man>.
- Display the man page for a command:

View File

@@ -13,10 +13,6 @@ source: https://github.com/tldr-pages/tldr.git
`more {{path/to/file}}`
- Search case-[i]nsensitively when pressing "/":
`more -i {{path/to/file}}`
- Display a specific line:
`more +{{line_number}} {{path/to/file}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# netstat
> Display network-related information such as open connections, open socket ports, etc.
> More information: <https://man7.org/linux/man-pages/man8/netstat.8.html>.
> More information: <https://manned.org/netstat>.
- List all ports:

View File

@@ -16,18 +16,18 @@ source: https://github.com/tldr-pages/tldr.git
`ping -c {{count}} "{{host}}"`
- Ping `host`, specifying the interval in `seconds` between requests (default is 1 second):
- Ping a host, specifying the interval in seconds between requests (default is 1 second):
`ping -i {{seconds}} "{{host}}"`
- Ping `host` without trying to lookup symbolic names for addresses:
- Ping a host without trying to lookup symbolic names for addresses:
`ping -n "{{host}}"`
- Ping `host` and ring the bell when a packet is received (if your terminal supports it):
- Ping a host and ring the bell when a packet is received (if your terminal supports it):
`ping -a "{{host}}"`
- Ping `host` and prints the time a packet was received (this option is an Apple addition):
- Ping a host and prints the time a packet was received (this option is an Apple addition):
`ping --apple-time "{{host}}"`

View File

@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
- Randomize the order of lines in a file and output the result:
`shuf {{filename}}`
`shuf {{path/to/file}}`
- Only output the first 5 entries of the result:
`shuf --head-count={{5}} {{filename}}`
`shuf --head-count=5 {{path/to/file}}`
- Write output to another file:
`shuf {{filename}} --output={{output_filename}}`
`shuf {{path/to/input_file}} --output={{ath/to/output_file}}`
- Generate random numbers in the range 1 to 10:
`shuf --input-range={{1-10}}`
`shuf --input-range=1-10`

View File

@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
- Split a file, each split having 10 lines (except the last split):
`split -l {{10}} {{filename}}`
`split -l 10 {{path/to/file}}`
- Split a file by a regular expression. The matching line will be the first line of the next output file:
`split -p {{cat|^[dh]og}} {{filename}}`
`split -p {{cat|^[dh]og}} {{path/to/file}}`
- Split a file with 512 bytes in each split (except the last split; use 512k for kilobytes and 512m for megabytes):
`split -b {{512}} {{filename}}`
`split -b 512 {{path/to/file}}`
- Split a file into 5 files. File is split such that each split has same size (except the last split):
`split -n {{5}} {{filename}}`
`split -n 5 {{path/to/file}}`

View File

@@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git
- Create an archive with an 8 MB block size:
`yaa archive -b {{8m}} -d {{path/to/directory}} -o {{path/to/output_file.yaa}}`
`yaa archive -b 8m -d {{path/to/directory}} -o {{path/to/output_file.yaa}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# pgrep
> Find or signal processes by name.
> More information: <https://www.man7.org/linux/man-pages/man1/pkill.1.html>.
> More information: <https://www.manned.org/pgrep>.
- Return PIDs of any running processes with a matching command string:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Signal process by name.
> Mostly used for stopping processes.
> More information: <https://www.man7.org/linux/man-pages/man1/pkill.1.html>.
> More information: <https://www.manned.org/pkill>.
- Kill all processes which match:

View File

@@ -14,12 +14,12 @@ source: https://github.com/tldr-pages/tldr.git
- Only output the first 5 entries of the result:
`shuf --head-count={{5}} {{path/to/file}}`
`shuf --head-count=5 {{path/to/file}}`
- Write the output to another file:
`shuf {{path/to/input}} --output={{path/to/output}}`
`shuf {{path/to/input_file}} --output={{path/to/output_file}}`
- Generate 3 random numbers in the range 1-10 (inclusive):
`shuf --head-count={{3}} --input-range={{1-10}} --repeat`
`shuf --head-count=3 --input-range=1-10 --repeat`

View File

@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
- Split a file, each split having 10 lines (except the last split):
`split -l {{10}} {{path/to/file}}`
`split -l 10 {{path/to/file}}`
- Split a file into 5 files. File is split such that each split has same size (except the last split):
`split -n {{5}} {{path/to/file}}`
`split -n 5 {{path/to/file}}`
- Split a file with 512 bytes in each split (except the last split; use 512k for kilobytes and 512m for megabytes):
`split -b {{512}} {{path/to/file}}`
`split -b 512 {{path/to/file}}`
- Split a file with at most 512 bytes in each split without breaking lines:
`split -C {{512}} {{path/to/file}}`
`split -C 512 {{path/to/file}}`

View File

@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
- Print out a list of top 5 CPU using processes every second:
`prstat -c -n {{5}} -s cpu {{1}}`
`prstat -c -n 5 -s cpu 1`

View File

@@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git
- Export query results to a specific file:
`{{prompt}}=> \g {{/path/to/results.txt}}`
`{{prompt}}=> \g {{path/to/file_with_results}}`
- Import data from a CSV file into a specific table: