mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-27 11:53:28 +00:00
Update cheatsheets
This commit is contained in:
41
tldr/filebrowser
Normal file
41
tldr/filebrowser
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# filebrowser
|
||||||
|
|
||||||
|
> Simple HTTP web server to manage files and directories.
|
||||||
|
> More information: <https://filebrowser.org>.
|
||||||
|
|
||||||
|
- Start a new server instance serving the current directory:
|
||||||
|
|
||||||
|
`filebrowser`
|
||||||
|
|
||||||
|
- Start a new server instance serving a specific root directory:
|
||||||
|
|
||||||
|
`filebrowser {{-r|--root}} {{path/to/directory}}`
|
||||||
|
|
||||||
|
- Start an instance with different host address (defaults to `127.0.0.1`) and port (defaults to `8080`):
|
||||||
|
|
||||||
|
`filebrowser {{-a|--address}} {{host}} {{-p|--port}} {{port}} {{-r|--root}} {{path/to/directory}}`
|
||||||
|
|
||||||
|
- Start an instance with a specified configuration file, storing the application database in a specific location (defaults to `filebrowser.db` on the current directory):
|
||||||
|
|
||||||
|
`filebrowser {{-c|--config}} {{path/to/file}} {{-d|--database}} {{path/to/database.db}} {{-r|--root}} {{path/to/directory}}`
|
||||||
|
|
||||||
|
- Set up a different default first-time account username and password (both default to `admin`) when setting up a new instance:
|
||||||
|
|
||||||
|
`filebrowser --username {{username}} --password {{password}} {{-r|--root}} {{path/to/directory}}`
|
||||||
|
|
||||||
|
- Set up the maximum amount of image processors used when generating thumbnails (defaults to `4`):
|
||||||
|
|
||||||
|
`filebrowser --img-processors {{4}} {{-r|--root}} {{path/to/directory}}`
|
||||||
|
|
||||||
|
- Disable image thumbnails as well as the Command Runner feature, limiting access for hosted script files from being executed inside the app:
|
||||||
|
|
||||||
|
`filebrowser --disable-exec --disable-thumbnails {{-r|--root}} {{path/to/directory}}`
|
||||||
|
|
||||||
|
- Disable resizing of image previews as well as detecting file types by reading their headers:
|
||||||
|
|
||||||
|
`filebrowser --disable-preview-resize --disable-type-detection-by-header {{-r|--root}} {{path/to/directory}}`
|
||||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Find files matching multiple path/name patterns:
|
- Find files matching multiple path/name patterns:
|
||||||
|
|
||||||
`find {{root_path}} -path '{{**/path/**/*.ext}}' -or -name '{{*pattern*}}'`
|
`find {{root_path}} -path '{{*/path/*/*.ext}}' -or -name '{{*pattern*}}'`
|
||||||
|
|
||||||
- Find directories matching a given name, in case-insensitive mode:
|
- Find directories matching a given name, in case-insensitive mode:
|
||||||
|
|
||||||
@@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`find {{root_path}} -daystart -mtime {{-1}} -exec {{tar -cvf archive.tar}} {} \+`
|
`find {{root_path}} -daystart -mtime {{-1}} -exec {{tar -cvf archive.tar}} {} \+`
|
||||||
|
|
||||||
- Find empty files (0 byte) or directories and delete them verbosely:
|
- Search for either empty files or directories and delete them verbosely:
|
||||||
|
|
||||||
`find {{root_path}} -type {{f|d}} -empty -delete -print`
|
`find {{root_path}} -type {{f|d}} -empty -delete -print`
|
||||||
|
|||||||
25
tldr/linux/lxc-ls
Normal file
25
tldr/linux/lxc-ls
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, linux]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# lxc-ls
|
||||||
|
|
||||||
|
> List Linux containers.
|
||||||
|
> More information: <https://linuxcontainers.org/lxc/manpages/man1/lxc-ls.1.html>.
|
||||||
|
|
||||||
|
- List active containers (including frozen and running):
|
||||||
|
|
||||||
|
`lxc-ls --active`
|
||||||
|
|
||||||
|
- List only frozen containers:
|
||||||
|
|
||||||
|
`lxc-ls --frozen`
|
||||||
|
|
||||||
|
- List only stopped containers:
|
||||||
|
|
||||||
|
`lxc-ls --stopped`
|
||||||
|
|
||||||
|
- List containers in a fancy, column-based output:
|
||||||
|
|
||||||
|
`lxc-ls --fancy`
|
||||||
14
tldr/rmlint
14
tldr/rmlint
@@ -12,9 +12,9 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`rmlint {{path/to/directory1 path/to/directory2 ...}}`
|
`rmlint {{path/to/directory1 path/to/directory2 ...}}`
|
||||||
|
|
||||||
- Check for space wasters, preferably keeping files in tagged directories (after the double slash):
|
- Check for duplicates bigger than a specific size, preferably keeping files in tagged directories (after the double slash):
|
||||||
|
|
||||||
`rmlint {{path/to/directory}} // {{path/to/original_directory}}`
|
`rmlint -s {{1MB}} {{path/to/directory}} // {{path/to/original_directory}}`
|
||||||
|
|
||||||
- Check for space wasters, keeping everything in the untagged directories:
|
- Check for space wasters, keeping everything in the untagged directories:
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`./rmlint.sh`
|
`./rmlint.sh`
|
||||||
|
|
||||||
- Find duplicate directory trees:
|
- Find duplicate directory trees based on data, ignoring names:
|
||||||
|
|
||||||
`rmlint --merge-directories {{path/to/directory}}`
|
`rmlint --merge-directories {{path/to/directory}}`
|
||||||
|
|
||||||
@@ -32,10 +32,10 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`rmlint --rank-by={{dl}} {{path/to/directory}}`
|
`rmlint --rank-by={{dl}} {{path/to/directory}}`
|
||||||
|
|
||||||
- Find only duplicates that have the same filename in addition to the same contents:
|
- Find files with identical filename and contents, and link rather than delete the duplicates:
|
||||||
|
|
||||||
`rmlint --match-basename {{path/to/directory}}`
|
`rmlint -c sh:link --match-basename {{path/to/directory}}`
|
||||||
|
|
||||||
- Find only duplicates that have the same extension in addition to the same contents:
|
- Use `data` as master directory. Find only duplicates in backup that are also in `data`. Do not delete any files in `data`:
|
||||||
|
|
||||||
`rmlint --match-extension {{path/to/directory}}`
|
`rmlint {{path/to/backup}} // {{path/to/data}} --keep-all-tagged --must-match-tagged`
|
||||||
|
|||||||
35
tldr/trip
Normal file
35
tldr/trip
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# trip
|
||||||
|
|
||||||
|
> A network diagnostic tool.
|
||||||
|
> Combines the functionality of `traceroute` and `ping`.
|
||||||
|
> Designed to assist with the analysis of networking issues.
|
||||||
|
> More information: <https://trippy.rs/>.
|
||||||
|
|
||||||
|
- Basic usage with default parameters:
|
||||||
|
|
||||||
|
`sudo trip {{example.com}}`
|
||||||
|
|
||||||
|
- Trace without requiring elevated privileges (supported platforms only):
|
||||||
|
|
||||||
|
`trip {{example.com}} --unprivileged`
|
||||||
|
|
||||||
|
- Trace using `IPv6` only:
|
||||||
|
|
||||||
|
`sudo trip {{example.com}} --ipv6`
|
||||||
|
|
||||||
|
- Trace using the `udp` protocol:
|
||||||
|
|
||||||
|
`sudo trip {{example.com}} --protocol {{udp}}`
|
||||||
|
|
||||||
|
- Use custom destination port `443` for `tcp` tracing:
|
||||||
|
|
||||||
|
`sudo trip {{example.com}} --protocol {{tcp}} --target-port {{443}}`
|
||||||
|
|
||||||
|
- Use custom source port `5000` for `udp` tracing:
|
||||||
|
|
||||||
|
`sudo trip {{example.com}} --protocol {{udp}} --source-port {{5000}}`
|
||||||
42
tldr/vagrant-box
Normal file
42
tldr/vagrant-box
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# vagrant box
|
||||||
|
|
||||||
|
> Manage Vagrant boxes (virtual machine images).
|
||||||
|
> See also: `vagrant`.
|
||||||
|
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/box>.
|
||||||
|
|
||||||
|
- List all installed boxes:
|
||||||
|
|
||||||
|
`vagrant box list`
|
||||||
|
|
||||||
|
- Add a new box:
|
||||||
|
|
||||||
|
`vagrant box add {{hashicorp/bionic64}}`
|
||||||
|
|
||||||
|
- Add a box from a custom URL:
|
||||||
|
|
||||||
|
`vagrant box add {{my-box}} {{https://example.com/my-box.box}}`
|
||||||
|
|
||||||
|
- Remove an installed box:
|
||||||
|
|
||||||
|
`vagrant box remove {{hashicorp/bionic64}}`
|
||||||
|
|
||||||
|
- Update all boxes that are in use in the current Vagrant environment:
|
||||||
|
|
||||||
|
`vagrant box update`
|
||||||
|
|
||||||
|
- Update a specific box:
|
||||||
|
|
||||||
|
`vagrant box update --box {{bento/debian-12}}`
|
||||||
|
|
||||||
|
- Check if there is a new version available for the box that you are using:
|
||||||
|
|
||||||
|
`vagrant box outdated`
|
||||||
|
|
||||||
|
- Clean up old versions of installed boxes:
|
||||||
|
|
||||||
|
`vagrant box prune`
|
||||||
Reference in New Issue
Block a user