mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-05 21:44:31 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/c++
Normal file
12
tldr/c++
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# c++
|
||||
|
||||
> This command is an alias of `g++`.
|
||||
|
||||
- View documentation for original command:
|
||||
|
||||
`tldr g++`
|
||||
33
tldr/linux/dutree
Normal file
33
tldr/linux/dutree
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# dutree
|
||||
|
||||
> Analyze file system usage with colorful text-based trees.
|
||||
> More information: <https://github.com/nachoparker/dutree#usage>.
|
||||
|
||||
- Show a graphical tree of the current directory:
|
||||
|
||||
`dutree`
|
||||
|
||||
- Show a specific directory:
|
||||
|
||||
`dutree {{path/to/directory}}`
|
||||
|
||||
- Aggregate items smaller than a number of KB (or M for MB, or G for GB):
|
||||
|
||||
`dutree --aggr {{number}}K`
|
||||
|
||||
- Show subdirectories up to the specified depth (default is 1):
|
||||
|
||||
`dutree --depth {{depth}}`
|
||||
|
||||
- Skip directories for a fast local overview:
|
||||
|
||||
`dutree --files-only`
|
||||
|
||||
- Exclude hidden files:
|
||||
|
||||
`dutree --no-hidden`
|
||||
12
tldr/nest
12
tldr/nest
@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display information about installed nest version:
|
||||
|
||||
`nest info`
|
||||
`nest {{[i|info]}}`
|
||||
|
||||
- Create a new NestJS project in a directory of the same name:
|
||||
|
||||
`nest new {{project_name}}`
|
||||
`nest {{[n|new]}} {{project_name}}`
|
||||
|
||||
- Build a specific NestJS project:
|
||||
|
||||
@@ -27,3 +27,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Import a library into the current NestJS project:
|
||||
|
||||
`nest add {{library_name}}`
|
||||
|
||||
- Generate a new component:
|
||||
|
||||
`nest {{[g|generate]}} {{module|controller|service|...}} {{component_name}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`nest`
|
||||
|
||||
22
tldr/npm-shrinkwrap
Normal file
22
tldr/npm-shrinkwrap
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm shrinkwrap
|
||||
|
||||
> Lock down the dependencies of a package, creating a `npm-shrinkwrap.json` file.
|
||||
> Similar to `package-lock.json` but intended for published packages.
|
||||
> More information: <https://docs.npmjs.com/cli/shrinkwrap>.
|
||||
|
||||
- Generate a `npm-shrinkwrap.json` file from the current `package-lock.json`:
|
||||
|
||||
`npm shrinkwrap`
|
||||
|
||||
- Run in production mode (excludes devDependencies):
|
||||
|
||||
`npm shrinkwrap --production`
|
||||
|
||||
- Force recreate the shrinkwrap file even if it already exists:
|
||||
|
||||
`npm shrinkwrap --force`
|
||||
12
tldr/pnpm
12
tldr/pnpm
@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Download all the packages listed as dependencies in `package.json`:
|
||||
|
||||
`pnpm install`
|
||||
`pnpm {{[i|install]}}`
|
||||
|
||||
- Download a specific version of a package and add it to the list of dependencies in `package.json`:
|
||||
|
||||
@@ -23,20 +23,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Download a package and add it to the list of dev dependencies in `package.json`:
|
||||
|
||||
`pnpm add {{[-D|--save-dev]}} {{module_name}}`
|
||||
`pnpm add {{module_name}} {{[-D|--save-dev]}}`
|
||||
|
||||
- Download a package and install it globally:
|
||||
|
||||
`pnpm add {{[-g|--global]}} {{module_name}}`
|
||||
`pnpm add {{module_name}} {{[-g|--global]}}`
|
||||
|
||||
- Uninstall a package and remove it from the list of dependencies in `package.json`:
|
||||
|
||||
`pnpm remove {{module_name}}`
|
||||
`pnpm {{[rm|remove]}} {{module_name}}`
|
||||
|
||||
- Print a tree of locally installed modules:
|
||||
|
||||
`pnpm list`
|
||||
`pnpm {{[ls|list]}}`
|
||||
|
||||
- List top-level globally installed modules:
|
||||
|
||||
`pnpm list {{[-g|--global]}} --depth {{0}}`
|
||||
`pnpm {{[ls|list]}} {{[-g|--global]}} --depth {{0}}`
|
||||
|
||||
34
tldr/rabbitmq-diagnostics
Normal file
34
tldr/rabbitmq-diagnostics
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rabbitmq-diagnostics
|
||||
|
||||
> Diagnose, monitor, and run health checks on RabbitMQ nodes.
|
||||
> Many subcommands are delegated to `rabbitmqctl`.
|
||||
> More information: <https://www.rabbitmq.com/docs/man/rabbitmq-diagnostics.8.html>.
|
||||
|
||||
- List resource alarms:
|
||||
|
||||
`rabbitmq-diagnostics alarms`
|
||||
|
||||
- List node certificates:
|
||||
|
||||
`rabbitmq-diagnostics certificates`
|
||||
|
||||
- Check if RabbitMQ is running on the specified node:
|
||||
|
||||
`rabbitmq-diagnostics check_running --node {{node}}`
|
||||
|
||||
- Run peer discovery:
|
||||
|
||||
`rabbitmq-diagnostics discover_peers`
|
||||
|
||||
- List listeners (bound sockets):
|
||||
|
||||
`rabbitmq-diagnostics listeners`
|
||||
|
||||
- Print the last `n` log lines on the specified node:
|
||||
|
||||
`rabbitmq-diagnostics log_tail --number {{n}} --node {{node}}`
|
||||
25
tldr/rabbitmq-plugins
Normal file
25
tldr/rabbitmq-plugins
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rabbitmq-plugins
|
||||
|
||||
> Manage RabbitMQ plugins.
|
||||
> More information: <https://www.rabbitmq.com/docs/man/rabbitmq-plugins.8.html>.
|
||||
|
||||
- List plugins:
|
||||
|
||||
`rabbitmq-plugins list`
|
||||
|
||||
- Enable a plugin:
|
||||
|
||||
`rabbitmq-plugins enable {{plugin}}`
|
||||
|
||||
- Disable a plugin:
|
||||
|
||||
`rabbitmq-plugins disable {{plugin}}`
|
||||
|
||||
- Enable a plugin and disable the rest:
|
||||
|
||||
`rabbitmq-plugins set {{plugin}}`
|
||||
33
tldr/rabbitmq-queues
Normal file
33
tldr/rabbitmq-queues
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rabbitmq-queues
|
||||
|
||||
> Manage RabbitMQ queues.
|
||||
> More information: <https://www.rabbitmq.com/docs/man/rabbitmq-queues.8.html>.
|
||||
|
||||
- Grow quorum queue clusters by adding a member on the specified node:
|
||||
|
||||
`rabbitmq-queues grow {{node}} {{all|even}}`
|
||||
|
||||
- Rebalance leaders of replicated queues across nodes:
|
||||
|
||||
`rabbitmq-queues rebalance {{all|quorum|stream}}`
|
||||
|
||||
- Shrink quorum queue clusters by removing any members on the specified node:
|
||||
|
||||
`rabbitmq-queues shrink {{node}}`
|
||||
|
||||
- Add a quorum queue member on the specified node:
|
||||
|
||||
`rabbitmq-queues add_member {{queue}} {{node}}`
|
||||
|
||||
- Delete a quorum queue member on the specified node:
|
||||
|
||||
`rabbitmq-queues delete_member {{queue}} {{node}}`
|
||||
|
||||
- Display quorum status of a quorum queue:
|
||||
|
||||
`rabbitmq-queues quorum_status {{queue}}`
|
||||
41
tldr/rabbitmq-streams
Normal file
41
tldr/rabbitmq-streams
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rabbitmq-streams
|
||||
|
||||
> Manage RabbitMQ streams.
|
||||
> More information: <https://www.rabbitmq.com/docs/man/rabbitmq-streams.8.html>.
|
||||
|
||||
- Add a stream replica on the specified node:
|
||||
|
||||
`rabbitmq-streams add_replica {{stream}} {{node}}`
|
||||
|
||||
- Delete a stream replica on the specified node:
|
||||
|
||||
`rabbitmq-streams delete_replica {{stream}} {{node}}`
|
||||
|
||||
- Display the status of a stream:
|
||||
|
||||
`rabbitmq-streams stream_status {{stream}}`
|
||||
|
||||
- Restart a stream:
|
||||
|
||||
`rabbitmq-streams restart_stream {{stream}}`
|
||||
|
||||
- List stream connections:
|
||||
|
||||
`rabbitmq-streams list_stream_connections`
|
||||
|
||||
- List all stream consumers:
|
||||
|
||||
`rabbitmq-streams list_stream_consumers`
|
||||
|
||||
- List all stream publishers:
|
||||
|
||||
`rabbitmq-streams list_stream_publishers`
|
||||
|
||||
- List tracking information for a stream:
|
||||
|
||||
`rabbitmq-streams list_stream_tracking {{stream}}`
|
||||
42
tldr/windows/clear-history
Normal file
42
tldr/windows/clear-history
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# Clear-History
|
||||
|
||||
> A powershell command to clear the entries in the current session.
|
||||
> Note: `clhy` can be used as an alias for `Clear-History`.
|
||||
> More information: <https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/clear-history>.
|
||||
|
||||
- Clear all command history from current session:
|
||||
|
||||
`Clear-History`
|
||||
|
||||
- Clear command by specific name:
|
||||
|
||||
`Clear-History -CommandLine "{{command}}"`
|
||||
|
||||
- Clear multiple commands by name:
|
||||
|
||||
`Clear-History -CommandLine "{{command_1}}", "{{command_2}}"`
|
||||
|
||||
- Clear a specific history entry by ID:
|
||||
|
||||
`Clear-History -Id {{id_number}}`
|
||||
|
||||
- Clear multiple IDs:
|
||||
|
||||
`Clear-History -Id {{id_1}}, {{id_2}}, {{id_3}}`
|
||||
|
||||
- Clear commands within a range of IDs:
|
||||
|
||||
`Clear-History -Id ({{start_id}}..{{end_id}})`
|
||||
|
||||
- Show what would be deleted:
|
||||
|
||||
`Clear-History -WhatIf`
|
||||
|
||||
- Ask for confirmation before clearing:
|
||||
|
||||
`Clear-History -Confirm`
|
||||
12
tldr/windows/clhy
Normal file
12
tldr/windows/clhy
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# clhy
|
||||
|
||||
> This command is an alias of `Clear-History`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr Clear-History`
|
||||
38
tldr/windows/netsh
Normal file
38
tldr/windows/netsh
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# netsh
|
||||
|
||||
> Manage Windows network settings.
|
||||
> Some subcommands such as `wlan` have their own usage documentation.
|
||||
> More information: <https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/netsh>.
|
||||
|
||||
- Add a helper Dynamic Link Library (DLL):
|
||||
|
||||
`netsh add helper {{path oile.dll}}`
|
||||
|
||||
- Show all loaded helper DLLs:
|
||||
|
||||
`netsh show helper`
|
||||
|
||||
- Delete a helper DLL:
|
||||
|
||||
`netsh delete helper {{path oile.dll}}`
|
||||
|
||||
- Export your network configuration settings to a file:
|
||||
|
||||
`netsh dump > {{path o\output_file.txt}}`
|
||||
|
||||
- Show available network interfaces for tracing:
|
||||
|
||||
`netsh trace show interfaces`
|
||||
|
||||
- Exit the shell:
|
||||
|
||||
`exit`
|
||||
|
||||
- Display help:
|
||||
|
||||
`netsh help`
|
||||
12
tldr/windows/ren
Normal file
12
tldr/windows/ren
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ren
|
||||
|
||||
> This command is an alias of `Rename-Item`.
|
||||
|
||||
- View documentation for original command:
|
||||
|
||||
`tldr Rename-Item`
|
||||
30
tldr/windows/rename-item
Normal file
30
tldr/windows/rename-item
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# Rename-Item
|
||||
|
||||
> Powershell command to rename an item.
|
||||
> Note: `ren` and `rni` can both be used as an alias for `Rename-Item`.
|
||||
> More information: <https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/rename-item>.
|
||||
|
||||
- Rename a file:
|
||||
|
||||
`Rename-Item -Path "{{path/to/file}}" -NewName "{{new_file_name}}"`
|
||||
|
||||
- Rename a directory:
|
||||
|
||||
`Rename-Item -Path "{{path/to/directory}}" -NewName "{{new_directory_name}}"`
|
||||
|
||||
- Rename and move a file:
|
||||
|
||||
`Rename-Item -Path "{{path/to/file}}" -NewName "{{path/to/new_file_name}}"`
|
||||
|
||||
- Rename a file by force:
|
||||
|
||||
`Rename-Item -Path "{{path/to/file}}" -NewName "{{new_file_name}}" -Force`
|
||||
|
||||
- Prompt confirmation before renaming a file:
|
||||
|
||||
`Rename-Item -Path "{{path/to/file}}" -NewName "{{new_file_name}}" {{[-Confirm|-cf]}}`
|
||||
12
tldr/windows/rni
Normal file
12
tldr/windows/rni
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rni
|
||||
|
||||
> This command is an alias of `Rename-Item`.
|
||||
|
||||
- View documentation for original command:
|
||||
|
||||
`tldr Rename-Item`
|
||||
Reference in New Issue
Block a user