diff --git a/tldr/az-contanier b/tldr/az-contanier new file mode 100644 index 00000000..b16db954 --- /dev/null +++ b/tldr/az-contanier @@ -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: . + +- 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}}` diff --git a/tldr/gc b/tldr/gc new file mode 100644 index 00000000..63a3e255 --- /dev/null +++ b/tldr/gc @@ -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: . + +- 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 -?` diff --git a/tldr/ghq b/tldr/ghq new file mode 100644 index 00000000..59dab634 --- /dev/null +++ b/tldr/ghq @@ -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: . + +- 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}}` diff --git a/tldr/git-fast-export b/tldr/git-fast-export index 75e937bc..4ef1f685 100644 --- a/tldr/git-fast-export +++ b/tldr/git-fast-export @@ -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: . - Export the entire Git repository history to `stdout`: diff --git a/tldr/git-sparse-checkout b/tldr/git-sparse-checkout new file mode 100644 index 00000000..ed377a96 --- /dev/null +++ b/tldr/git-sparse-checkout @@ -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: . + +- 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}}` diff --git a/tldr/kubectl b/tldr/kubectl index 555743d5..b54db060 100644 --- a/tldr/kubectl +++ b/tldr/kubectl @@ -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: diff --git a/tldr/kubectl-annotate b/tldr/kubectl-annotate new file mode 100644 index 00000000..0e101ec0 --- /dev/null +++ b/tldr/kubectl-annotate @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# kubectl annotate + +> Annotates Kubernetes resources. +> More information: . + +- 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}}-` diff --git a/tldr/kubectl-api-resources b/tldr/kubectl-api-resources index d0e3c06d..2f92474f 100644 --- a/tldr/kubectl-api-resources +++ b/tldr/kubectl-api-resources @@ -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}}` diff --git a/tldr/kubectl-autoscale b/tldr/kubectl-autoscale index 8fbf6ba2..f5e21fca 100644 --- a/tldr/kubectl-autoscale +++ b/tldr/kubectl-autoscale @@ -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}}` diff --git a/tldr/kubectl-create b/tldr/kubectl-create index 0265f14a..91bf51ef 100644 --- a/tldr/kubectl-create +++ b/tldr/kubectl-create @@ -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: diff --git a/tldr/kubectl-delete b/tldr/kubectl-delete index 64ae6999..ddd05e2b 100644 --- a/tldr/kubectl-delete +++ b/tldr/kubectl-delete @@ -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: diff --git a/tldr/kubectl-edit b/tldr/kubectl-edit index ab8b8004..8d35c0f6 100644 --- a/tldr/kubectl-edit +++ b/tldr/kubectl-edit @@ -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: diff --git a/tldr/kubectl-expose b/tldr/kubectl-expose index 3ba915d3..f192819b 100644 --- a/tldr/kubectl-expose +++ b/tldr/kubectl-expose @@ -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}}` diff --git a/tldr/kubectl-label b/tldr/kubectl-label index dbbce51c..4ef53692 100644 --- a/tldr/kubectl-label +++ b/tldr/kubectl-label @@ -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}}-` diff --git a/tldr/kubectl-logs b/tldr/kubectl-logs index 11325cb7..a847b904 100644 --- a/tldr/kubectl-logs +++ b/tldr/kubectl-logs @@ -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}}` diff --git a/tldr/kubectl-replace b/tldr/kubectl-replace index e549fd34..dbf9e7f7 100644 --- a/tldr/kubectl-replace +++ b/tldr/kubectl-replace @@ -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` diff --git a/tldr/kubectl-run b/tldr/kubectl-run index 9fc4d7cc..f7b986f9 100644 --- a/tldr/kubectl-run +++ b/tldr/kubectl-run @@ -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 ...}}` diff --git a/tldr/kubectl-scale b/tldr/kubectl-scale index eb5e659c..259bf2db 100644 --- a/tldr/kubectl-scale +++ b/tldr/kubectl-scale @@ -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}}` diff --git a/tldr/linux/ausearch b/tldr/linux/ausearch new file mode 100644 index 00000000..102cf88b --- /dev/null +++ b/tldr/linux/ausearch @@ -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: . + +- 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` diff --git a/tldr/linux/grub-mkrescue b/tldr/linux/grub-mkrescue new file mode 100644 index 00000000..dbbbff3a --- /dev/null +++ b/tldr/linux/grub-mkrescue @@ -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: . + +- 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` diff --git a/tldr/linux/ip-monitor b/tldr/linux/ip-monitor new file mode 100644 index 00000000..c9173336 --- /dev/null +++ b/tldr/linux/ip-monitor @@ -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: . + +- 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}}` diff --git a/tldr/linux/mhwd b/tldr/linux/mhwd new file mode 100644 index 00000000..d64ebede --- /dev/null +++ b/tldr/linux/mhwd @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# mhwd + +> Manjaro Hardware Detection utility . +> More information: . + +- 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` diff --git a/tldr/linux/paclog b/tldr/linux/paclog new file mode 100644 index 00000000..0a4f8d89 --- /dev/null +++ b/tldr/linux/paclog @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# paclog + +> Filter pacman log entries. +> More information: . + +- 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` diff --git a/tldr/linux/pacrepairdb b/tldr/linux/pacrepairdb new file mode 100644 index 00000000..1e738c26 --- /dev/null +++ b/tldr/linux/pacrepairdb @@ -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: . + +- 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` diff --git a/tldr/linux/rtmon b/tldr/linux/rtmon new file mode 100644 index 00000000..cd7a7afe --- /dev/null +++ b/tldr/linux/rtmon @@ -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: . + +- 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}}` diff --git a/tldr/linux/selinuxenabled b/tldr/linux/selinuxenabled new file mode 100644 index 00000000..cf2c6b1f --- /dev/null +++ b/tldr/linux/selinuxenabled @@ -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: . + +- 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` diff --git a/tldr/linux/semodule b/tldr/linux/semodule new file mode 100644 index 00000000..ca42a6d8 --- /dev/null +++ b/tldr/linux/semodule @@ -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: . + +- 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]}}` diff --git a/tldr/linux/systemctl-list-unit-files b/tldr/linux/systemctl-list-unit-files new file mode 100644 index 00000000..df043094 --- /dev/null +++ b/tldr/linux/systemctl-list-unit-files @@ -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: . + +- 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` diff --git a/tldr/linux/systemctl-preset b/tldr/linux/systemctl-preset new file mode 100644 index 00000000..534c7025 --- /dev/null +++ b/tldr/linux/systemctl-preset @@ -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: . + +- 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]}}` diff --git a/tldr/mvn-site b/tldr/mvn-site new file mode 100644 index 00000000..649a6e52 --- /dev/null +++ b/tldr/mvn-site @@ -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: . + +- 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` diff --git a/tldr/npm-completion b/tldr/npm-completion new file mode 100644 index 00000000..729f1fc7 --- /dev/null +++ b/tldr/npm-completion @@ -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: . + +- 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}}` diff --git a/tldr/npm-diff b/tldr/npm-diff new file mode 100644 index 00000000..9322c627 --- /dev/null +++ b/tldr/npm-diff @@ -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: . + +- 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}}` diff --git a/tldr/npm-dist-tag b/tldr/npm-dist-tag new file mode 100644 index 00000000..f02605ff --- /dev/null +++ b/tldr/npm-dist-tag @@ -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: . + +- 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}}` diff --git a/tldr/pip b/tldr/pip index 503df1eb..e38ad837 100644 --- a/tldr/pip +++ b/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}}` diff --git a/tldr/pip-check b/tldr/pip-check new file mode 100644 index 00000000..fcb6b4f6 --- /dev/null +++ b/tldr/pip-check @@ -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: . + +- Check for broken or missing requirements: + +`pip check` + +- Check and log output to a file: + +`pip check --log {{path/to/file}}` diff --git a/tldr/pip-config b/tldr/pip-config new file mode 100644 index 00000000..6a7a0d7f --- /dev/null +++ b/tldr/pip-config @@ -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: . + +- 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}}` diff --git a/tldr/pip-debug b/tldr/pip-debug new file mode 100644 index 00000000..4b42e78d --- /dev/null +++ b/tldr/pip-debug @@ -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: . + +- 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}}` diff --git a/tldr/pip-download b/tldr/pip-download new file mode 100644 index 00000000..1db411c7 --- /dev/null +++ b/tldr/pip-download @@ -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: . + +- 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}}` diff --git a/tldr/pip-list b/tldr/pip-list new file mode 100644 index 00000000..90e61521 --- /dev/null +++ b/tldr/pip-list @@ -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: . + +- 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` diff --git a/tldr/poetry-install b/tldr/poetry-install new file mode 100644 index 00000000..40fc796d --- /dev/null +++ b/tldr/poetry-install @@ -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: . + +- 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` diff --git a/tldr/tesseract b/tldr/tesseract index cf092b4e..164f8734 100644 --- a/tldr/tesseract +++ b/tldr/tesseract @@ -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: diff --git a/tldr/windows/cl b/tldr/windows/cl new file mode 100644 index 00000000..5987f6d2 --- /dev/null +++ b/tldr/windows/cl @@ -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: . + +- 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}}` diff --git a/tldr/windows/lib b/tldr/windows/lib new file mode 100644 index 00000000..03fe35e8 --- /dev/null +++ b/tldr/windows/lib @@ -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: . + +- 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}}` diff --git a/tldr/windows/netsh-wlan b/tldr/windows/netsh-wlan new file mode 100644 index 00000000..a7e1e62f --- /dev/null +++ b/tldr/windows/netsh-wlan @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# netsh wlan + +> Manage wireless networks. +> More information: . + +- 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 o older}} 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` diff --git a/tldr/windows/nmake b/tldr/windows/nmake new file mode 100644 index 00000000..1b722119 --- /dev/null +++ b/tldr/windows/nmake @@ -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: . + +- 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`