mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
38
tldr/az-contanier
Normal file
38
tldr/az-contanier
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# az container
|
||||
|
||||
> Manage Azure Container Instances.
|
||||
> Part of `azure-cli` (also known as `az`).
|
||||
> More information: <https://learn.microsoft.com/cli/azure/container>.
|
||||
|
||||
- Create a container in a container group:
|
||||
|
||||
`az container create {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{name}} --image {{image_name}} {{[-os|--os-type]}} {{windows|linux}} --cpu {{number_of_CPU_cores}} --memory {{memory_in_GB}}`
|
||||
|
||||
- Execute a command from within a running container of a container group:
|
||||
|
||||
`az container exec {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{container_group_name}} --exec-command "{{command}}"`
|
||||
|
||||
- Examine the logs of a container in a container group:
|
||||
|
||||
`az container logs {{[-n|--name]}} {{name}} {{[-g|--resource-group]}} {{resource_group}}`
|
||||
|
||||
- Get the details of a container group:
|
||||
|
||||
`az container show {{[-n|--name]}} {{name}} {{[-g|--resource-group]}} {{resource_group}}`
|
||||
|
||||
- Start all containers in a container group:
|
||||
|
||||
`az container start {{[-n|--name]}} {{name}} {{[-g|--resource-group]}} {{resource_group}}`
|
||||
|
||||
- Stop all containers in a container group:
|
||||
|
||||
`az container stop {{[-n|--name]}} {{name}} {{[-g|--resource-group]}} {{resource_group}}`
|
||||
|
||||
- Delete a container group:
|
||||
|
||||
`az container delete {{[-n|--name]}} {{name}} {{[-g|--resource-group]}} {{resource_group}}`
|
||||
29
tldr/gc
Normal file
29
tldr/gc
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gc
|
||||
|
||||
> Count nodes, edges, connected components, or clusters in Graphviz `.dot` files.
|
||||
> More information: <https://graphviz.org/pdf/gc.1.pdf>.
|
||||
|
||||
- Count nodes and edges in a file:
|
||||
|
||||
`gc {{path/to/file.dot}}`
|
||||
|
||||
- Count only [n]odes:
|
||||
|
||||
`gc -n {{path/to/file.dot}}`
|
||||
|
||||
- Count only [e]dges:
|
||||
|
||||
`gc -e {{path/to/file.dot}}`
|
||||
|
||||
- Count [c]onnected components:
|
||||
|
||||
`gc -c {{path/to/file.dot}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`gc -?`
|
||||
41
tldr/ghq
Normal file
41
tldr/ghq
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ghq
|
||||
|
||||
> Manage remote repository clones organized by hostname and path.
|
||||
> More information: <https://github.com/x-motemen/ghq>.
|
||||
|
||||
- Clone a repository under the `ghq` root directory (default is `~/ghq`):
|
||||
|
||||
`ghq get {{repository_url}}`
|
||||
|
||||
- Clone a repository from a user/project format (defaults to GitHub):
|
||||
|
||||
`ghq get {{user}}/{{project}}`
|
||||
|
||||
- Clone a repository and `cd` into it:
|
||||
|
||||
`ghq get {{repository_url}} --look`
|
||||
|
||||
- Clone a repository via SSH:
|
||||
|
||||
`ghq get {{user}}/{{project}} -p`
|
||||
|
||||
- Update an existing repository to the latest version:
|
||||
|
||||
`ghq get {{repository_url}} -u`
|
||||
|
||||
- List all locally cloned repositories:
|
||||
|
||||
`ghq list`
|
||||
|
||||
- List locally cloned repositories with full paths:
|
||||
|
||||
`ghq list --full-path`
|
||||
|
||||
- Remove a locally cloned repository:
|
||||
|
||||
`ghq rm {{user}}/{{project}}`
|
||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# git fast-export
|
||||
|
||||
> Exports the contents and history of a Git repository in a streamable, plain-text format.
|
||||
> Export the contents and history of a Git repository in a streamable, plain-text format.
|
||||
> More information: <https://manned.org/git-fast-export>.
|
||||
|
||||
- Export the entire Git repository history to `stdout`:
|
||||
|
||||
25
tldr/git-sparse-checkout
Normal file
25
tldr/git-sparse-checkout
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# git sparse-checkout
|
||||
|
||||
> Check out only part of a repository’s files instead of cloning or checking out everything.
|
||||
> More information: <https://manned.org/git-sparse-checkout>.
|
||||
|
||||
- Enable sparse checkout:
|
||||
|
||||
`git sparse-checkout init`
|
||||
|
||||
- Disable sparse-checkout and restore full repository:
|
||||
|
||||
`git sparse-checkout disable`
|
||||
|
||||
- Specify which directories (or files) to include:
|
||||
|
||||
`git sparse-checkout set {{path/to/directory}}`
|
||||
|
||||
- Add more paths later:
|
||||
|
||||
`git sparse-checkout add {{path/to/directory}}`
|
||||
@@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display resource (CPU/Memory/Storage) usage of nodes or pods:
|
||||
|
||||
`kubectl top {{pod|node}}`
|
||||
`kubectl top {{pods|node}}`
|
||||
|
||||
- Print the address of the master and cluster services:
|
||||
|
||||
|
||||
29
tldr/kubectl-annotate
Normal file
29
tldr/kubectl-annotate
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kubectl annotate
|
||||
|
||||
> Annotates Kubernetes resources.
|
||||
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_annotate>.
|
||||
|
||||
- Annotate a pod:
|
||||
|
||||
`kubectl annotate {{[po|pods]}} {{pod_name}} {{key}}={{value}}`
|
||||
|
||||
- Update a pod annotation by overwriting the existing value:
|
||||
|
||||
`kubectl annotate {{[po|pods]}} {{pod_name}} {{key}}={{value}} --overwrite`
|
||||
|
||||
- Annotate all pods in a namespace with a specific label selector:
|
||||
|
||||
`kubectl annotate {{[po|pods]}} {{key}}={{value}} {{[-l|--selector]}} {{label_key}}={{label_value}}`
|
||||
|
||||
- List all annotations a pod has:
|
||||
|
||||
`kubectl annotate {{[po|pods]}} {{pod_name}} --list`
|
||||
|
||||
- Remove the annotation from a pod:
|
||||
|
||||
`kubectl annotate {{[po|pods]}} {{pod_name}} {{key}}-`
|
||||
@@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print the supported API resources with a specific API group:
|
||||
|
||||
`kubectl api-resources --api-group={{api_group}}`
|
||||
`kubectl api-resources --api-group {{api_group}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Auto scale a deployment with no target CPU utilization specified:
|
||||
|
||||
`kubectl autoscale {{[deploy|deployment]}} {{deployment_name}} --min={{min_replicas}} --max={{max_replicas}}`
|
||||
`kubectl autoscale {{[deploy|deployment]}} {{deployment_name}} --min {{min_replicas}} --max {{max_replicas}}`
|
||||
|
||||
- Auto scale a deployment with target CPU utilization:
|
||||
|
||||
`kubectl autoscale {{[deploy|deployment]}} {{deployment_name}} --max={{max_replicas}} --cpu-percent={{target_cpu}}`
|
||||
`kubectl autoscale {{[deploy|deployment]}} {{deployment_name}} --max {{max_replicas}} --cpu-percent {{target_cpu}}`
|
||||
|
||||
@@ -18,15 +18,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a deployment:
|
||||
|
||||
`kubectl create {{[deploy|deployment]}} {{deployment_name}} --image={{image}}`
|
||||
`kubectl create {{[deploy|deployment]}} {{deployment_name}} --image {{image}}`
|
||||
|
||||
- Create a deployment with replicas:
|
||||
|
||||
`kubectl create {{[deploy|deployment]}} {{deployment_name}} --image={{image}} --replicas={{number_of_replicas}}`
|
||||
`kubectl create {{[deploy|deployment]}} {{deployment_name}} --image {{image}} --replicas {{number_of_replicas}}`
|
||||
|
||||
- Create a service:
|
||||
|
||||
`kubectl create {{[svc|service]}} {{service_type}} {{service_name}} --tcp={{port}}:{{target_port}}`
|
||||
`kubectl create {{[svc|service]}} {{service_type}} {{service_name}} --tcp {{port}}:{{target_port}}`
|
||||
|
||||
- Create a namespace:
|
||||
|
||||
|
||||
@@ -10,15 +10,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Delete a specific pod:
|
||||
|
||||
`kubectl delete {{[po|pod]}} {{pod_name}}`
|
||||
`kubectl delete {{[po|pods]}} {{pod_name}}`
|
||||
|
||||
- Delete a specific deployment:
|
||||
|
||||
`kubectl delete {{[deploy|deployment]}} {{deployment_name}}`
|
||||
`kubectl delete {{[deploy|deployments]}} {{deployment_name}}`
|
||||
|
||||
- Delete a specific node:
|
||||
|
||||
`kubectl delete {{[no|node]}} {{node_name}}`
|
||||
`kubectl delete {{[no|nodes]}} {{node_name}}`
|
||||
|
||||
- Delete all pods in a specified namespace:
|
||||
|
||||
@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Delete all deployments and services in a specified namespace:
|
||||
|
||||
`kubectl delete {{[deploy|deployment]}},{{[svc|services]}} --all {{[-n|--namespace]}} {{namespace}}`
|
||||
`kubectl delete {{[deploy|deployments]}},{{[svc|services]}} --all {{[-n|--namespace]}} {{namespace}}`
|
||||
|
||||
- Delete all nodes:
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Edit a pod in the default namespace:
|
||||
|
||||
`kubectl edit {{[po|pod]}}/{{pod_name}}`
|
||||
`kubectl edit {{[po|pods]}}/{{pod_name}}`
|
||||
|
||||
- Edit a deployment in the default namespace:
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a service for a resource, which will be served from container port to node port:
|
||||
|
||||
`kubectl expose {{resource_type}} {{resource_name}} --port={{node_port}} --target-port={{container_port}}`
|
||||
`kubectl expose {{resource_type}} {{resource_name}} --port {{node_port}} --target-port {{container_port}}`
|
||||
|
||||
- Create a service for a resource identified by a file:
|
||||
|
||||
`kubectl expose {{[-f|--filename]}} {{path/to/file.yml}} --port={{node_port}} --target-port={{container_port}}`
|
||||
`kubectl expose {{[-f|--filename]}} {{path/to/file.yml}} --port {{node_port}} --target-port {{container_port}}`
|
||||
|
||||
- Create a service with a name, to serve to a node port which will be same for container port:
|
||||
|
||||
`kubectl expose {{resource_type}} {{resource_name}} --port={{node_port}} --name={{service_name}}`
|
||||
`kubectl expose {{resource_type}} {{resource_name}} --port {{node_port}} --name {{service_name}}`
|
||||
|
||||
@@ -10,15 +10,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Label a pod:
|
||||
|
||||
`kubectl label {{[po|pod]}} {{pod_name}} {{key}}={{value}}`
|
||||
`kubectl label {{[po|pods]}} {{pod_name}} {{key}}={{value}}`
|
||||
|
||||
- Update a pod label by overwriting the existing value:
|
||||
|
||||
`kubectl label --overwrite pod {{pod_name}} {{key}}={{value}}`
|
||||
`kubectl label {{[po|pods]}} {{pod_name}} {{key}}={{value}} --overwrite`
|
||||
|
||||
- Label all pods in the namespace:
|
||||
|
||||
`kubectl label {{[po|pods]}} --all {{key}}={{value}}`
|
||||
`kubectl label {{[po|pods]}} {{key}}={{value}} --all`
|
||||
|
||||
- Label a pod identified by the pod definition file:
|
||||
|
||||
@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Remove the label from a pod:
|
||||
|
||||
`kubectl label {{[po|pod]}} {{pod_name}} {{key}}-`
|
||||
`kubectl label {{[po|pods]}} {{pod_name}} {{key}}-`
|
||||
|
||||
@@ -26,12 +26,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Show pod logs newer than a relative time like `10s`, `5m`, or `1h`:
|
||||
|
||||
`kubectl logs --since={{relative_time}} {{pod_name}}`
|
||||
`kubectl logs --since {{relative_time}} {{pod_name}}`
|
||||
|
||||
- Show the 10 most recent logs in a pod:
|
||||
|
||||
`kubectl logs --tail={{10}} {{pod_name}}`
|
||||
`kubectl logs --tail {{10}} {{pod_name}}`
|
||||
|
||||
- Show all pod logs for a given deployment:
|
||||
|
||||
`kubectl logs deployment/{{deployment_name}}`
|
||||
`kubectl logs {{[deploy|deployment]}}/{{deployment_name}}`
|
||||
|
||||
@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Force replace, delete and then re-create the resource:
|
||||
|
||||
`kubectl replace --force {{[-f|--filename]}} {{path/to/file.yml}}`
|
||||
`kubectl replace {{[-f|--filename]}} {{path/to/file.yml}} --force`
|
||||
|
||||
@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run an nginx pod and expose port 80:
|
||||
|
||||
`kubectl run {{nginx-dev}} --image=nginx --port 80`
|
||||
`kubectl run {{nginx-dev}} --image nginx --port 80`
|
||||
|
||||
- Run an nginx pod, setting the TEST_VAR environment variable:
|
||||
|
||||
`kubectl run {{nginx-dev}} --image=nginx --env="{{TEST_VAR}}={{testing}}"`
|
||||
`kubectl run {{nginx-dev}} --image nginx --env "{{TEST_VAR}}={{testing}}"`
|
||||
|
||||
- Show API calls that would be made to create an nginx container:
|
||||
|
||||
`kubectl run {{nginx-dev}} --image=nginx --dry-run={{none|server|client}}`
|
||||
`kubectl run {{nginx-dev}} --image nginx --dry-run={{none|server|client}}`
|
||||
|
||||
- Run an Ubuntu pod interactively, never restart it, and remove it when it exits:
|
||||
|
||||
`kubectl run {{temp-ubuntu}} --image=ubuntu:22.04 --restart=Never --rm -- /bin/bash`
|
||||
`kubectl run {{temp-ubuntu}} --image ubuntu:22.04 --restart Never --rm -- /bin/bash`
|
||||
|
||||
- Run an Ubuntu pod, overriding the default command with echo, and specifying custom arguments:
|
||||
|
||||
`kubectl run {{temp-ubuntu}} --image=ubuntu:22.04 --command -- echo {{argument1 argument2 ...}}`
|
||||
`kubectl run {{temp-ubuntu}} --image ubuntu:22.04 --command -- echo {{argument1 argument2 ...}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Scale a replica set:
|
||||
|
||||
`kubectl scale --replicas={{number_of_replicas}} rs/{{replica_name}}`
|
||||
`kubectl scale --replicas {{replicas_count}} rs/{{replica_name}}`
|
||||
|
||||
- Scale a resource identified by a file:
|
||||
|
||||
`kubectl scale --replicas={{number_of_replicas}} {{[-f|--filename]}} {{path/to/file.yml}}`
|
||||
`kubectl scale --replicas {{replicas_count}} {{[-f|--filename]}} {{path/to/file.yml}}`
|
||||
|
||||
- Scale a deployment based on current number of replicas:
|
||||
|
||||
`kubectl scale --current-replicas={{current_replicas}} --replicas={{number_of_replicas}} deployment/{{deployment_name}}`
|
||||
`kubectl scale --replicas {{replicas_count}} --current-replicas {{current_replicas}} {{[deploy|deployment]}}/{{deployment_name}}`
|
||||
|
||||
39
tldr/linux/ausearch
Normal file
39
tldr/linux/ausearch
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ausearch
|
||||
|
||||
> Query the Linux audit log for events.
|
||||
> Part of the `audit` package.
|
||||
> See also: `audit2why`, `audit2allow`, `aureport`.
|
||||
> More information: <https://manned.org/ausearch>.
|
||||
|
||||
- Search for all SELinux AVC denial events:
|
||||
|
||||
`sudo ausearch {{[-m|--message]}} avc`
|
||||
|
||||
- Search for events related to a specific executable:
|
||||
|
||||
`sudo ausearch {{[-c|--comm]}} {{httpd}}`
|
||||
|
||||
- Search for events from a specific user:
|
||||
|
||||
`sudo ausearch {{[-ui|--uid]}} {{1000}}`
|
||||
|
||||
- Search for events in the last 10 minutes:
|
||||
|
||||
`sudo ausearch {{[-ts|--start]}} recent`
|
||||
|
||||
- Search for failed login attempts:
|
||||
|
||||
`sudo ausearch {{[-m|--message]}} user_login {{[-sv|--success]}} no`
|
||||
|
||||
- Search for events related to a specific file:
|
||||
|
||||
`sudo ausearch {{[-f|--file]}} {{path/to/file}}`
|
||||
|
||||
- Display results in raw format for further processing:
|
||||
|
||||
`sudo ausearch {{[-m|--message]}} avc --raw`
|
||||
41
tldr/linux/grub-mkrescue
Normal file
41
tldr/linux/grub-mkrescue
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# grub-mkrescue
|
||||
|
||||
> Make a GRUB CD/USB/floppy bootable image.
|
||||
> More information: <https://www.gnu.org/software/grub/manual/grub/grub.html#Invoking-grub_002dmkrescue>.
|
||||
|
||||
- Create a bootable ISO from the current directory and save it as `grub.iso`:
|
||||
|
||||
`grub-mkrescue --output {{grub.iso}} .`
|
||||
|
||||
- Create an ISO using GRUB files from a custom directory:
|
||||
|
||||
`grub-mkrescue --directory {{/usr/lib/grub/i386-pc}} --output {{grub.iso}} {{path/to/source}}`
|
||||
|
||||
- Use compression for GRUB files when building the image, setting `no` disables compression:
|
||||
|
||||
`grub-mkrescue --compress {{no|xz|gz|lzo}} --output {{grub.iso}} {{path/to/source}}`
|
||||
|
||||
- Disable the GRUB command-line interface in the generated image:
|
||||
|
||||
`grub-mkrescue --disable-cli --output {{grub.iso}} {{path/to/source}}`
|
||||
|
||||
- Preload specific GRUB modules into the image:
|
||||
|
||||
`grub-mkrescue --modules "{{part_gpt iso9660}}" --output {{grub.iso}} {{path/to/source}}`
|
||||
|
||||
- Pass additional options directly to `xorriso`:
|
||||
|
||||
`grub-mkrescue --output {{grub.iso}} -- {{-volid}} {{volume_name}} {{path/to/source}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`grub-mkrescue {{[-?|--help]}}`
|
||||
|
||||
- Display version:
|
||||
|
||||
`grub-mkrescue --version`
|
||||
21
tldr/linux/ip-monitor
Normal file
21
tldr/linux/ip-monitor
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ip monitor
|
||||
|
||||
> Monitor network for state changes.
|
||||
> More information: <https://manned.org/ip-monitor>.
|
||||
|
||||
- Monitor the whole network for state changes:
|
||||
|
||||
`ip {{[mo|monitor]}}`
|
||||
|
||||
- Specify the type to monitor:
|
||||
|
||||
`ip {{[mo|monitor]}} {{link|address|route|neigh|rule|maddress|...}}`
|
||||
|
||||
- Replay an event file (can be generated with `rtmon`):
|
||||
|
||||
`ip {{[mo|monitor]}} {{[f|file]}} {{path/to/file}}`
|
||||
33
tldr/linux/mhwd
Normal file
33
tldr/linux/mhwd
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# mhwd
|
||||
|
||||
> Manjaro Hardware Detection utility .
|
||||
> More information: <https://wiki.manjaro.org/index.php/Manjaro_Hardware_Detection_Overview>.
|
||||
|
||||
- List available drivers:
|
||||
|
||||
`mhwd {{[-l|--list]}}`
|
||||
|
||||
- List installed drivers:
|
||||
|
||||
`mhwd {{[-li|--listinstalled]}}`
|
||||
|
||||
- Install a driver:
|
||||
|
||||
`mhwd {{[-i|--install]}} {{pci|usb}} {{driver_name}}`
|
||||
|
||||
- Remove a driver:
|
||||
|
||||
`mhwd {{[-r|--remove]}} {{pci|usb}} {{driver_name}}`
|
||||
|
||||
- Display detailed information about detected hardware:
|
||||
|
||||
`mhwd {{[-l|--list]}} {{[-d|--detail]}}`
|
||||
|
||||
- Automatically install best available driver for the detected graphics card:
|
||||
|
||||
`mhwd {{[-a|--auto]}} pci {{free|nonfree}} 0300`
|
||||
37
tldr/linux/paclog
Normal file
37
tldr/linux/paclog
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# paclog
|
||||
|
||||
> Filter pacman log entries.
|
||||
> More information: <https://github.com/andrewgregory/pacutils/blob/master/doc/paclog.pod>.
|
||||
|
||||
- Display the entire pacman log:
|
||||
|
||||
`paclog`
|
||||
|
||||
- Display pacman-style logged commandline entries:
|
||||
|
||||
`paclog --commandline`
|
||||
|
||||
- Display only errors, warnings, and notes:
|
||||
|
||||
`paclog --warnings`
|
||||
|
||||
- Display package name and action type:
|
||||
|
||||
`paclog --package {{package_name}} --action {{install|upgrade|remove|...}}`
|
||||
|
||||
- Display the list of installed packages according to the log:
|
||||
|
||||
`paclog --pkglist`
|
||||
|
||||
- Display help:
|
||||
|
||||
`paclog --help`
|
||||
|
||||
- Display version:
|
||||
|
||||
`paclog --version`
|
||||
33
tldr/linux/pacrepairdb
Normal file
33
tldr/linux/pacrepairdb
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pacrepairdb
|
||||
|
||||
> Fix corrupted database entries in libalpm database.
|
||||
> More information: <https://github.com/andrewgregory/pacutils/blob/master/doc/pacrepairdb.pod>.
|
||||
|
||||
- Perform a basic repair on a specific package:
|
||||
|
||||
`pacrepairdb {{package_name}}`
|
||||
|
||||
- Update the database entries without extracting or removing any packages:
|
||||
|
||||
`pacrepairdb {{package_name}} --dbonly`
|
||||
|
||||
- Display the packages to be repaired and the cache packages to be used without making any changes:
|
||||
|
||||
`pacrepairdb {{package_name}} --print-only`
|
||||
|
||||
- Display additional progress and debug information:
|
||||
|
||||
`pacrepairdb {{package_name}} --verbose`
|
||||
|
||||
- Display help:
|
||||
|
||||
`pacrepairdb --help`
|
||||
|
||||
- Display version:
|
||||
|
||||
`pacrepairdb --version`
|
||||
17
tldr/linux/rtmon
Normal file
17
tldr/linux/rtmon
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rtmon
|
||||
|
||||
> Save network state changes to a file.
|
||||
> More information: <https://manned.org/rtmon>.
|
||||
|
||||
- Save all network state changes to a file:
|
||||
|
||||
`sudo rtmon {{[f|file]}} {{path/to/file}}`
|
||||
|
||||
- Specify the type of change to log:
|
||||
|
||||
`sudo rtmon {{[f|file}} {{link|address|route}}`
|
||||
23
tldr/linux/selinuxenabled
Normal file
23
tldr/linux/selinuxenabled
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# selinuxenabled
|
||||
|
||||
> Check whether SELinux is enabled.
|
||||
> Returns exit code 0 if SELinux is enabled, and 1 if it is not.
|
||||
> See also: `getenforce`, `setenforce`, `sestatus`.
|
||||
> More information: <https://manned.org/selinuxenabled>.
|
||||
|
||||
- Check if SELinux is enabled (no output; check exit code with `echo $?`):
|
||||
|
||||
`selinuxenabled`
|
||||
|
||||
- Check if SELinux is enabled and print the result:
|
||||
|
||||
`selinuxenabled && echo "SELinux is enabled" || echo "SELinux is disabled"`
|
||||
|
||||
- Use in a shell script to conditionally execute commands:
|
||||
|
||||
`if selinuxenabled; then echo "SELinux is running"; fi`
|
||||
38
tldr/linux/semodule
Normal file
38
tldr/linux/semodule
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# semodule
|
||||
|
||||
> Manage SELinux policy modules.
|
||||
> See also: `audit2allow`, `semanage`.
|
||||
> More information: <https://manned.org/semodule>.
|
||||
|
||||
- List all installed policy modules:
|
||||
|
||||
`sudo semodule {{[-l|--list]}}`
|
||||
|
||||
- Install a new policy module:
|
||||
|
||||
`sudo semodule {{[-i|--install]}} {{path/to/module.pp}}`
|
||||
|
||||
- Remove a policy module:
|
||||
|
||||
`sudo semodule {{[-r|--remove]}} {{module_name}}`
|
||||
|
||||
- Enable a policy module:
|
||||
|
||||
`sudo semodule {{[-e|--enable]}} {{module_name}}`
|
||||
|
||||
- Disable a policy module:
|
||||
|
||||
`sudo semodule {{[-d|--disable]}} {{module_name}}`
|
||||
|
||||
- Reload all policy modules:
|
||||
|
||||
`sudo semodule {{[-R|--reload]}}`
|
||||
|
||||
- Display the version of installed policy modules:
|
||||
|
||||
`sudo semodule {{[-l|--list]}} {{[-v|--verbose]}}`
|
||||
34
tldr/linux/systemctl-list-unit-files
Normal file
34
tldr/linux/systemctl-list-unit-files
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl list-unit-files
|
||||
|
||||
> List installed unit files and their enablement states.
|
||||
> See also: `systemctl list-units` for listing units currently loaded in memory.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#list-unit-files%20PATTERN%E2%80%A6>.
|
||||
|
||||
- List installed unit files and their states:
|
||||
|
||||
`systemctl list-unit-files`
|
||||
|
||||
- Filter by state:
|
||||
|
||||
`systemctl list-unit-files --state {{enabled|disabled|static|...}}`
|
||||
|
||||
- Filter by unit type:
|
||||
|
||||
`systemctl list-unit-files {{[-t|--type]}} {{service|socket|timer|...}}`
|
||||
|
||||
- Filter by a name pattern:
|
||||
|
||||
`systemctl list-unit-files '{{sshd*}}'`
|
||||
|
||||
- Print output directly to `stdout`:
|
||||
|
||||
`systemctl list-unit-files --no-pager`
|
||||
|
||||
- Print output without headers or footers:
|
||||
|
||||
`systemctl list-unit-files --no-legend`
|
||||
26
tldr/linux/systemctl-preset
Normal file
26
tldr/linux/systemctl-preset
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl preset
|
||||
|
||||
> Reset the enablement state of unit files to the defaults specified in preset policy files.
|
||||
> See also: `systemctl preset-all`, `systemctl list-unit-files`.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#preset%20UNIT%E2%80%A6>.
|
||||
|
||||
- Reset the enablement state to preset defaults:
|
||||
|
||||
`systemctl preset {{unit1 unit2 ...}}`
|
||||
|
||||
- Enable only if marked as enabled in the preset policy:
|
||||
|
||||
`systemctl preset {{unit}} --preset-mode enable-only`
|
||||
|
||||
- Disable only if marked as disabled in the preset policy:
|
||||
|
||||
`systemctl preset {{unit}} --preset-mode disable-only`
|
||||
|
||||
- Suppress output and return only the exit code:
|
||||
|
||||
`systemctl preset {{unit}} {{[-q|--quiet]}}`
|
||||
29
tldr/mvn-site
Normal file
29
tldr/mvn-site
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# mvn site
|
||||
|
||||
> Generate a project website based on the information in the `pom.xml` file.
|
||||
> More information: <https://maven.apache.org/plugins/maven-site-plugin/>.
|
||||
|
||||
- Generate a project site using the site plugin:
|
||||
|
||||
`mvn site`
|
||||
|
||||
- Generate a site for a specific Maven project (multi-module build):
|
||||
|
||||
`mvn site {{[-pl|--projects]}} {{module_name}}`
|
||||
|
||||
- Clean previous site output before generating a new one:
|
||||
|
||||
`mvn clean site`
|
||||
|
||||
- Skip tests while generating the site:
|
||||
|
||||
`mvn site {{[-D|--define]}} skipTests`
|
||||
|
||||
- Generate and deploy the site to the remote server:
|
||||
|
||||
`mvn site-deploy`
|
||||
25
tldr/npm-completion
Normal file
25
tldr/npm-completion
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm completion
|
||||
|
||||
> Enable or set up tab-completion for npm commands.
|
||||
> More information: <https://docs.npmjs.com/cli/commands/npm-completion>.
|
||||
|
||||
- Enable tab-completion for the current shell session:
|
||||
|
||||
`npm completion`
|
||||
|
||||
- Add completion to your shell profile (Bash):
|
||||
|
||||
`npm completion >> ~/.bashrc`
|
||||
|
||||
- Add completion to your shell profile (Zsh):
|
||||
|
||||
`npm completion >> ~/.zshrc`
|
||||
|
||||
- Write completions script to a specific file:
|
||||
|
||||
`npm completion > {{path/to/file}}`
|
||||
38
tldr/npm-diff
Normal file
38
tldr/npm-diff
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm diff
|
||||
|
||||
> Compare package versions from the `npm` registry and show differences.
|
||||
> Similar to `git diff`.
|
||||
> More information: <https://docs.npmjs.com/cli/commands/npm-diff>.
|
||||
|
||||
- Compare two specific package versions:
|
||||
|
||||
`npm diff --diff {{package_name}}@{{version1}} --diff {{package_name}}@{{version2}}`
|
||||
|
||||
- Compare current local packages with latest published version:
|
||||
|
||||
`npm diff`
|
||||
|
||||
- Compare current local package with a specific version:
|
||||
|
||||
`npm diff --diff {{package_name}}@{{version}}`
|
||||
|
||||
- Compare a package in the current directory with the registry version:
|
||||
|
||||
`npm diff --diff {{package_name}}`
|
||||
|
||||
- Show only filenames that differ:
|
||||
|
||||
`npm diff --diff-name-only --diff {{package_name}}@{{version1}} --diff {{package_name}}@{{version2}}`
|
||||
|
||||
- Compare specific files or directories only:
|
||||
|
||||
`npm diff {{path/to/file_or_directory}} --diff {{package_name}}@{{version1}} --diff {{package_name}}@{{version2}}`
|
||||
|
||||
- Ignore whitespace when comparing:
|
||||
|
||||
`npm diff --diff-ignore-all-space --diff {{package_name}}@{{version1}} --diff {{package_name}}@{{version2}}`
|
||||
33
tldr/npm-dist-tag
Normal file
33
tldr/npm-dist-tag
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm dist-tag
|
||||
|
||||
> Manage distribution tags on packages.
|
||||
> More information: <https://docs.npmjs.com/cli/commands/npm-dist-tag>.
|
||||
|
||||
- List all distribution tags for a package:
|
||||
|
||||
`npm dist-tag ls {{package_name}}`
|
||||
|
||||
- List all distribution tags for the current package:
|
||||
|
||||
`npm dist-tag ls`
|
||||
|
||||
- Add a distribution tag to a specific package version:
|
||||
|
||||
`npm dist-tag add {{package_name}}@{{version}} {{tag}}`
|
||||
|
||||
- Remove a distribution tag from a package:
|
||||
|
||||
`npm dist-tag rm {{package_name}} {{tag}}`
|
||||
|
||||
- Add a tag using the configured tag from npm config:
|
||||
|
||||
`npm dist-tag add {{package_name}}@{{version}}`
|
||||
|
||||
- Add a tag with two-factor authentication:
|
||||
|
||||
`npm dist-tag add {{package_name}}@{{version}} {{tag}} --otp {{one_time_password}}`
|
||||
4
tldr/pip
4
tldr/pip
@@ -29,6 +29,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`pip freeze > {{requirements.txt}}`
|
||||
|
||||
- List installed packages:
|
||||
|
||||
`pip list`
|
||||
|
||||
- Show installed package info:
|
||||
|
||||
`pip show {{package}}`
|
||||
|
||||
17
tldr/pip-check
Normal file
17
tldr/pip-check
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pip check
|
||||
|
||||
> Check installed packages for broken or incompatible dependencies.
|
||||
> More information: <https://pip.pypa.io/en/stable/cli/pip_check/>.
|
||||
|
||||
- Check for broken or missing requirements:
|
||||
|
||||
`pip check`
|
||||
|
||||
- Check and log output to a file:
|
||||
|
||||
`pip check --log {{path/to/file}}`
|
||||
37
tldr/pip-config
Normal file
37
tldr/pip-config
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pip config
|
||||
|
||||
> Manage local and global configuration for pip.
|
||||
> More information: <https://pip.pypa.io/en/stable/cli/pip_config/>.
|
||||
|
||||
- List all configuration values:
|
||||
|
||||
`pip config list`
|
||||
|
||||
- Show configuration files and their values:
|
||||
|
||||
`pip config debug`
|
||||
|
||||
- Set the value for a command option:
|
||||
|
||||
`pip config set {{command.option}} {{value}} {{--global|--user|--site}}`
|
||||
|
||||
- Get the value for a command option:
|
||||
|
||||
`pip config get {{command.option}} {{--global|--user|--site}}`
|
||||
|
||||
- Unset the value for a command option:
|
||||
|
||||
`pip config unset {{command.option}} {{--global|--user|--site}}`
|
||||
|
||||
- Edit the configuration file with the default editor:
|
||||
|
||||
`pip config edit {{--global|--user|--site}}`
|
||||
|
||||
- Edit the configuration file with a specific editor:
|
||||
|
||||
`pip config edit {{--global|--user|--site}} --editor {{path/to/editor/binary}}`
|
||||
30
tldr/pip-debug
Normal file
30
tldr/pip-debug
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pip debug
|
||||
|
||||
> Display debug information about the current pip environment and configuration.
|
||||
> Intended for debugging; options and output may change without notice.
|
||||
> More information: <https://pip.pypa.io/en/stable/cli/pip_debug/>.
|
||||
|
||||
- Show general debug information:
|
||||
|
||||
`pip debug`
|
||||
|
||||
- Show debug information for a specific platform:
|
||||
|
||||
`pip debug --platform {{platform}}`
|
||||
|
||||
- Show debug information for a specific Python version:
|
||||
|
||||
`pip debug --python-version {{version}}`
|
||||
|
||||
- Show debug information for a specific Python implementation:
|
||||
|
||||
`pip debug --implementation {{implementation}}`
|
||||
|
||||
- Show debug information for a specific ABI:
|
||||
|
||||
`pip debug --abi {{abi}}`
|
||||
29
tldr/pip-download
Normal file
29
tldr/pip-download
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pip download
|
||||
|
||||
> Download Python packages without installing them.
|
||||
> More information: <https://pip.pypa.io/en/stable/cli/pip_download/>.
|
||||
|
||||
- Download a package wheel or source archive to the current directory:
|
||||
|
||||
`pip download {{package}}`
|
||||
|
||||
- Download a specific version of a package:
|
||||
|
||||
`pip download {{package}}=={{version}}`
|
||||
|
||||
- Download a package and its dependencies to a specific directory:
|
||||
|
||||
`pip download {{package}} {{[-d|--dest]}} {{path/to/directory}}`
|
||||
|
||||
- Download a package for a specific platform and Python version:
|
||||
|
||||
`pip download {{package}} --only-binary :all: --platform {{platform}} --python-version {{version}}`
|
||||
|
||||
- Download a package from a specific index URL:
|
||||
|
||||
`pip download {{package}} {{[-i|--index-url]}} {{url}}`
|
||||
41
tldr/pip-list
Normal file
41
tldr/pip-list
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pip list
|
||||
|
||||
> List installed Python packages.
|
||||
> More information: <https://pip.pypa.io/en/stable/cli/pip_list/>.
|
||||
|
||||
- List installed packages:
|
||||
|
||||
`pip list`
|
||||
|
||||
- List outdated packages that can be upgraded:
|
||||
|
||||
`pip list {{[-o|--outdated]}}`
|
||||
|
||||
- List up-to-date packages:
|
||||
|
||||
`pip list {{[-u|--uptodate]}}`
|
||||
|
||||
- List packages with JSON formatting:
|
||||
|
||||
`pip list --format json`
|
||||
|
||||
- List packages that are not required by other packages:
|
||||
|
||||
`pip list --not-required`
|
||||
|
||||
- List packages installed in user-site only:
|
||||
|
||||
`pip list --user`
|
||||
|
||||
- List packages and exclude editable packages from output:
|
||||
|
||||
`pip list --exclude-editable`
|
||||
|
||||
- List packages in freeze format (unlike `pip freeze`, does not show editable install information):
|
||||
|
||||
`pip list --format freeze`
|
||||
25
tldr/poetry-install
Normal file
25
tldr/poetry-install
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# poetry install
|
||||
|
||||
> Install all dependencies for a Python project as defined in the pyproject.toml file.
|
||||
> More information: <https://python-poetry.org/docs/cli/#install>.
|
||||
|
||||
- Install dependencies:
|
||||
|
||||
`poetry install`
|
||||
|
||||
- Skip installing the project itself as a dependency:
|
||||
|
||||
`poetry install --no-root`
|
||||
|
||||
- Install only production dependencies:
|
||||
|
||||
`poetry install --without dev`
|
||||
|
||||
- Install optional dependenciy groups:
|
||||
|
||||
`poetry install --with test,docs`
|
||||
@@ -10,19 +10,19 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Recognize text in an image and save it to `output.txt` (the `.txt` extension is added automatically):
|
||||
|
||||
`tesseract {{image.png}} {{output}}`
|
||||
`tesseract {{path/to/image.png}} output`
|
||||
|
||||
- Specify a custom language (default is English) with an ISO 639-2 code (e.g. deu = Deutsch = German):
|
||||
- Specify a custom [l]anguage (default is English) with an ISO 639-2 code (e.g. deu = Deutsch = German):
|
||||
|
||||
`tesseract -l deu {{image.png}} {{output}}`
|
||||
`tesseract -l deu {{path/to/image.png}} {{path/to/output}}`
|
||||
|
||||
- List the ISO 639-2 codes of available languages:
|
||||
- List the ISO 639-2 codes of installed languages:
|
||||
|
||||
`tesseract --list-langs`
|
||||
|
||||
- Specify a custom page segmentation mode (default is 3):
|
||||
- Specify a custom [p]age [s]egmentation [m]ode (default is 3):
|
||||
|
||||
`tesseract --psm {{0_to_10}} {{image.png}} {{output}}`
|
||||
`tesseract --psm {{0..13}} {{path/to/image.png}} {{path/to/output}}`
|
||||
|
||||
- List page segmentation modes and their descriptions:
|
||||
|
||||
|
||||
37
tldr/windows/cl
Normal file
37
tldr/windows/cl
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# cl
|
||||
|
||||
> The Microsoft C/C++ compiler for compiling and linking source code files.
|
||||
> More information: <https://learn.microsoft.com/cpp/build/reference/compiler-command-line-syntax>.
|
||||
|
||||
- Compile a source file:
|
||||
|
||||
`cl {{path/to/source.c}}`
|
||||
|
||||
- Compile and create an executable with a custom name:
|
||||
|
||||
`cl /Fe {{path/to/output_executable}} {{path/to/source.c}}`
|
||||
|
||||
- Compile a source file with optimization enabled:
|
||||
|
||||
`cl /O2 {{path/to/source.c}}`
|
||||
|
||||
- Compile a source file and create a debug executable:
|
||||
|
||||
`cl /Zi {{path/to/source.c}}`
|
||||
|
||||
- Compile multiple source files:
|
||||
|
||||
`cl {{path/to/source1.c path/to/source2.c ...}}`
|
||||
|
||||
- Specify the output directory for compiled files:
|
||||
|
||||
`cl /Fo {{path/to/output_directory/}} {{path/to/source.c}}`
|
||||
|
||||
- Compile with warnings as errors:
|
||||
|
||||
`cl /WX {{path/to/source.c}}`
|
||||
33
tldr/windows/lib
Normal file
33
tldr/windows/lib
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lib
|
||||
|
||||
> The Microsoft Library Manager for creating and managing static libraries of object files.
|
||||
> More information: <https://learn.microsoft.com/cpp/build/reference/lib-reference>.
|
||||
|
||||
- Create a static library from object files:
|
||||
|
||||
`lib /OUT :{{path/to/library.lib}} {{path/to/file1.obj path/to/file2.obj ...}}`
|
||||
|
||||
- List the contents of a library:
|
||||
|
||||
`lib /LIST {{path/to/library.lib}}`
|
||||
|
||||
- Add an object file to an existing library:
|
||||
|
||||
`lib {{path/to/library.lib}} {{path/to/file.obj}}`
|
||||
|
||||
- Remove an object file from a library:
|
||||
|
||||
`lib /REMOVE :{{path/to/file.obj}} {{path/to/library.lib}}`
|
||||
|
||||
- Extract an object file from a library:
|
||||
|
||||
`lib /EXTRACT :{{path/to/file.obj}} {{path/to/library.lib}}`
|
||||
|
||||
- Create an import library from a DLL:
|
||||
|
||||
`lib /DEF :{{path/to/definition.def}} /OUT:{{path/to/import.lib}}`
|
||||
41
tldr/windows/netsh-wlan
Normal file
41
tldr/windows/netsh-wlan
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# netsh wlan
|
||||
|
||||
> Manage wireless networks.
|
||||
> More information: <https://www.serverwatch.com/guides/netsh-commands/>.
|
||||
|
||||
- Show all available wireless networks:
|
||||
|
||||
`netsh wlan show networks`
|
||||
|
||||
- Connect to a wireless network with a specific SSID:
|
||||
|
||||
`netsh wlan connect name={{SSID}}`
|
||||
|
||||
- Disconnect from the current wireless network:
|
||||
|
||||
`netsh wlan disconnect`
|
||||
|
||||
- Show current wireless network interfaces and status:
|
||||
|
||||
`netsh wlan show interfaces`
|
||||
|
||||
- Export a wireless network profile to an XML file:
|
||||
|
||||
`netsh wlan export profile name={{SSID}} folder={{C:\path oolder}} key=clear`
|
||||
|
||||
- Delete a saved wireless network profile:
|
||||
|
||||
`netsh wlan delete profile name={{SSID}}`
|
||||
|
||||
- Enable hosted network (turn PC into Wi-Fi hotspot):
|
||||
|
||||
`netsh wlan set hostednetwork mode=allow ssid={{SSID}} key={{password}}`
|
||||
|
||||
- Start the hosted network:
|
||||
|
||||
`netsh wlan start hostednetwork`
|
||||
41
tldr/windows/nmake
Normal file
41
tldr/windows/nmake
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nmake
|
||||
|
||||
> The Microsoft Program Maintenance Utility for building projects based on commands in a makefile.
|
||||
> More information: <https://learn.microsoft.com/cpp/build/reference/nmake-reference>.
|
||||
|
||||
- Build targets using the default makefile in the current directory:
|
||||
|
||||
`nmake`
|
||||
|
||||
- Build targets using a specific makefile:
|
||||
|
||||
`nmake /F {{path/to/makefile}}`
|
||||
|
||||
- Build a specific target:
|
||||
|
||||
`nmake {{target}}`
|
||||
|
||||
- Display commands without executing them:
|
||||
|
||||
`nmake /N`
|
||||
|
||||
- Display all macro definitions and target descriptions:
|
||||
|
||||
`nmake /P`
|
||||
|
||||
- Continue building unrelated targets on error:
|
||||
|
||||
`nmake /K`
|
||||
|
||||
- Build and ignore timestamp checks (force rebuild):
|
||||
|
||||
`nmake /A`
|
||||
|
||||
- Suppress copyright message:
|
||||
|
||||
`nmake /NOLOGO`
|
||||
Reference in New Issue
Block a user