diff --git a/tldr/bun b/tldr/bun index 5e65dfae..d478f3fa 100644 --- a/tldr/bun +++ b/tldr/bun @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > JavaScript runtime and toolkit. > Includes a bundler, a test runner, and a package manager. -> More information: . +> More information: . - Run a JavaScript file or a `package.json` script: diff --git a/tldr/crane b/tldr/crane index 22c83e33..c1cd80f2 100644 --- a/tldr/crane +++ b/tldr/crane @@ -9,26 +9,34 @@ source: https://github.com/tldr-pages/tldr.git > Some subcommands such as `pull`, `push`, `copy`, etc. have their own usage documentation. > More information: . -- Execute a `crane` subcommand: +- Log in to a registry: -`crane {{subcommand}}` +`crane auth login {{registry}} {{[-u|--username]}} {{user}} {{[-p|--password]}} {{password}}` -- Allow pushing non-distributable (foreign) layers: +- List the repos in a registry: -`crane --allow-nondistributable-artifacts {{subcommand}}` +`crane catalog {{registry}} --full-ref` -- Allow image references to be fetched without TLS: +- List the tags in a repository: -`crane --insecure {{subcommand}}` +`crane ls {{repository}} {{[-o|--omit-digest-tags]}}` -- Specify the platform in the form `os/arch/variant:osversion` (e.g. `linux/amd64`). (default all): +- Pull remote images by reference and store their contents locally: -`crane --platform {{platform}} {{subcommand}}` +`crane pull {{image}} {{tarball}}` -- Enable debug logs for a subcommand: +- Push local image contents to a remote registry: -`crane {{[-v|--verbose]}} {{subcommand}}` +`crane push {{path/to/directory_or_tarball}} {{image}}` -- Display help for a subcommand: +- Efficiently tag a remote image: -`crane {{[-h|--help]}} {{subcommand}}` +`crane tag {{image}} {{tag}}` + +- Efficiently copy a remote image from src to dst while retaining the digest value: + +`crane copy {{src}} {{dst}} {{[-a|--all-tags]}}` + +- Delete an image reference from its registry: + +`crane delete {{image}}` diff --git a/tldr/duc b/tldr/duc index 05f6ddbf..ac8200df 100644 --- a/tldr/duc +++ b/tldr/duc @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > A collection of tools for indexing, inspecting, and visualizing disk usage. > Duc maintains a database of accumulated sizes of directories of the file system, allowing queries in this database, or creating fancy graphs to show where data is. -> More information: . +> More information: . - Index the `/usr` directory, writing to the default database location `~/.duc.db`: diff --git a/tldr/gcrane b/tldr/gcrane index 4f6e764e..1ee96f2a 100644 --- a/tldr/gcrane +++ b/tldr/gcrane @@ -6,31 +6,35 @@ source: https://github.com/tldr-pages/tldr.git # gcrane > Container images managing tool. -> This tool implements a superset of the `crane` commands, with additional commands that are specific to `gcr.io`. +> This tool implements a superset of the `crane` commands, with additional commands that are specific to Google Container Registry (`gcr.io`). > Some subcommands such as `append`, `auth`, `copy`, etc. have their own usage documentation which can be found under `crane`. > Some subcommands such as `completion`, `gc`, `help` are specific to gcrane and have their own usage documentation. > More information: . -- Execute a `gcrane` subcommand: +- Login to a registry: -`gcrane {{subcommand}}` +`gcrane auth login {{registry}} {{[-u|--username]}} {{user}} {{[-p|--password]}} {{password}}` -- Allow pushing non-distributable (foreign) layers: +- List tags, manifests, and sub-repostiories: -`gcrane --allow-nondistributable-artifacts {{subcommand}}` +`gcrane ls {{registry}}/{{project_id}}` -- Allow image references to be fetched without TLS: +- Copy images from one registry to another: -`gcrane --insecure {{subcommand}}` +`gcrane cp {{[-r|--recursive]}} {{source_registry}}/{{project_id}}/{{repository}} {{target_registry}}/{{project_id}}/{{repository}}` -- Specify the platform in the form `os/arch/variant:osversion` (e.g. `linux/amd64`). (default all): +- Print images that can be garbage collected: -`gcrane --platform {{platform}} {{subcommand}}` +`gcrane gc {{registry}}/{{project_id}}/{{repository}}` -- Enable debug logs: +- Delete images that can be garbage collected: -`gcrane {{[-v|--verbose]}} {{subcommand}}` +`gcrane gc {{registry}}/{{project_id}}/{{repository}} | xargs {{[-n|--max-args]}} 1 gcrane delete` -- Display help: +- List a specific registry with specific ID: -`gcrane {{[-h|--help]}}` +`gcrane ls {{gcr.io}}/{{my-project-id}}` + +- Migrate all images from US registry to EU registry: + +`gcrane cp {{[-r|--recursive]}} {{gcr.io}}/{{my-project-id}}/{{repository}} {{eu.gcr.io}}/{{my-project-id}}/{{repository}}` diff --git a/tldr/gh-project b/tldr/gh-project new file mode 100644 index 00000000..8a2aefa2 --- /dev/null +++ b/tldr/gh-project @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gh project + +> Work with GitHub Projects. +> More information: . + +- List projects owned by the currently authenticated user: + +`gh project {{[ls|list]}}` + +- List projects owned by a specific user or organization: + +`gh project {{[ls|list]}} --owner {{owner}}` + +- View a project by number: + +`gh project view {{number}} --owner {{owner}}` + +- Create a new project: + +`gh project create --owner {{owner}} --title {{project_title}}` + +- Add an item (issue or pull request) to a project: + +`gh project item-add {{number}} --owner {{owner}} --url {{issue_or_pr_url}}` + +- List items in a project: + +`gh project item-list {{number}} --owner {{owner}}` + +- Close a project: + +`gh project close {{number}} --owner {{owner}}` diff --git a/tldr/git-submodule b/tldr/git-submodule index f121b789..5838a348 100644 --- a/tldr/git-submodule +++ b/tldr/git-submodule @@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git - Update every submodule to its latest commit: -`git submodule foreach git pull` +`git submodule update --init --recursive --remote` diff --git a/tldr/hg b/tldr/hg index 054cfb9b..116fd2f4 100644 --- a/tldr/hg +++ b/tldr/hg @@ -9,18 +9,34 @@ source: https://github.com/tldr-pages/tldr.git > Some subcommands such as `commit` have their own usage documentation. > More information: . -- Execute a Mercurial command: +- Create an empty Mercurial repository: -`hg {{command}}` +`hg init` -- Display help: +- Clone a remote Mercurial repository from the internet: -`hg help` +`hg clone {{https://example.com/repo}}` -- Display help for a specific command: +- View the status of a local repository: -`hg help {{command}}` +`hg status` -- Display version: +- Add all new files to the next commit: -`hg --version` +`hg add` + +- Commit changes to version history: + +`hg commit {{[-m|--message]}} {{message_text}}` + +- Push local changes to a remote repository: + +`hg push` + +- Pull any changes made to a remote: + +`hg pull` + +- Reset everything the way it was in the latest commit: + +`hg update {{[-C|--clean]}}; hg purge` diff --git a/tldr/htop b/tldr/htop index 1a391491..70f4755d 100644 --- a/tldr/htop +++ b/tldr/htop @@ -28,14 +28,14 @@ source: https://github.com/tldr-pages/tldr.git `htop {{[-d|--delay]}} {{50}}` +- Disable all system and process changing features: + +`htop --readonly` + - See interactive commands while running htop: -`` +`{{|}}` - Switch to a different tab: `` - -- Display help: - -`htop {{[-h|--help]}}` diff --git a/tldr/linux/links b/tldr/linux/links index 6707abbe..f6bb6d57 100644 --- a/tldr/linux/links +++ b/tldr/linux/links @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Command-line text-only web browser. > See also: `links2'. -> More information: . +> More information: . - Visit a website: diff --git a/tldr/linux/links2 b/tldr/linux/links2 index 8c69a221..5af27dd0 100644 --- a/tldr/linux/links2 +++ b/tldr/linux/links2 @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Command-line web browser with optional graphics support. > See also: `links`. -> More information: . +> More information: . - Visit a website in graphics mode: diff --git a/tldr/linux/systemctl-reload b/tldr/linux/systemctl-reload new file mode 100644 index 00000000..bfd9506f --- /dev/null +++ b/tldr/linux/systemctl-reload @@ -0,0 +1,22 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl reload + +> Reload a service's configuration without restarting it. +> This reloads the service itself (like Apache or Nginx configs), not the systemd unit file. +> To reload unit files, use `systemctl daemon-reload`. + +- Reload a service: + +`systemctl reload {{nginx}}` + +- Reload multiple services: + +`systemctl reload {{networking apache2 ...}}` + +- Reload a service for the current user: + +`systemctl --user reload {{pipewire}}` diff --git a/tldr/linux/systemctl-show b/tldr/linux/systemctl-show new file mode 100644 index 00000000..9d4f4eb4 --- /dev/null +++ b/tldr/linux/systemctl-show @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl show + +> Show properties of units or systemd itself. +> More information: . + +- Show properties of the system service manager: + +`systemctl show` + +- Show properties of the user service manager: + +`systemctl show --user` + +- Show properties of a specific unit: + +`systemctl show {{unit}}` + +- Show properties of a specific user unit: + +`systemctl show --user {{unit}}` + +- Include empty properties in the list: + +`systemctl show {{[-a|--all]}}` + +- Only show the specified properties: + +`systemctl show {{[-p|--property]}} {{Wants,Conflicts,...}} {{unit}}` diff --git a/tldr/pip b/tldr/pip index c37d05f4..503df1eb 100644 --- a/tldr/pip +++ b/tldr/pip @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Python package manager. > Some subcommands such as `install` have their own usage documentation. -> More information: . +> More information: . - Install a package (see `pip install` for more install examples): diff --git a/tldr/srun b/tldr/srun new file mode 100644 index 00000000..ed94994c --- /dev/null +++ b/tldr/srun @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# srun + +> Run a command under the Slurm workload manager. +> More information: . + +- Run a simple command interactively: + +`srun hostname` + +- Run a job with 4 tasks (CPUs): + +`srun {{[-n|--ntasks]}} 4 {{path/to/program}}` + +- Allocate 8 GB of memory: + +`srun --mem 8G {{path/to/program}}` + +- Run a job on a specific partition: + +`srun {{[-p|--partition]}} gpu {{path/to/program}}` + +- Run a job and save the output to a file: + +`srun {{path/to/program}} > {{path/to/output}}`