mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-14 23:48:43 +00:00
Update cheatsheets
This commit is contained in:
41
tldr/bun-build
Normal file
41
tldr/bun-build
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# bun build
|
||||
|
||||
> Bundle JavaScript and TypeScript files with Bun's fast native bundler.
|
||||
> More information: <https://bun.com/docs/bundler>.
|
||||
|
||||
- Bundle an entry point to a single output file:
|
||||
|
||||
`bun build {{path/to/entry.ts}} --outfile {{path/to/output.js}}`
|
||||
|
||||
- Bundle multiple entry points to an output directory:
|
||||
|
||||
`bun build {{path/to/entry1.ts path/to/entry2.ts ...}} --outdir {{path/to/dist}}`
|
||||
|
||||
- Bundle with source maps for debugging:
|
||||
|
||||
`bun build {{path/to/entry.ts}} --outfile {{path/to/output.js}} --sourcemap`
|
||||
|
||||
- Bundle with minification for production:
|
||||
|
||||
`bun build {{path/to/entry.ts}} --outfile {{path/to/output.js}} --minify`
|
||||
|
||||
- Bundle with a specific target environment:
|
||||
|
||||
`bun build {{path/to/entry.ts}} --outfile {{path/to/output.js}} --target {{browser|bun|node}}`
|
||||
|
||||
- Bundle to a standalone executable:
|
||||
|
||||
`bun build {{path/to/entry.ts}} --compile --outfile {{path/to/executable}}`
|
||||
|
||||
- Watch for file changes and rebuild automatically:
|
||||
|
||||
`bun build {{path/to/entry.ts}} --outfile {{path/to/output.js}} --watch`
|
||||
|
||||
- Bundle with external dependencies not included in the output:
|
||||
|
||||
`bun build {{path/to/entry.ts}} --outfile {{path/to/output.js}} --external {{react react-dom}}`
|
||||
12
tldr/chown
12
tldr/chown
@@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Change the owner user of a file/directory:
|
||||
|
||||
`chown {{user}} {{path/to/file_or_directory}}`
|
||||
`sudo chown {{user}} {{path/to/file_or_directory}}`
|
||||
|
||||
- Change the owner user and group of a file/directory:
|
||||
|
||||
`chown {{user}}:{{group}} {{path/to/file_or_directory}}`
|
||||
`sudo chown {{user}}:{{group}} {{path/to/file_or_directory}}`
|
||||
|
||||
- Change the owner user and group to both have the name `user`:
|
||||
|
||||
`chown {{user}}: {{path/to/file_or_directory}}`
|
||||
`sudo chown {{user}}: {{path/to/file_or_directory}}`
|
||||
|
||||
- Recursively change the owner of a directory and its contents:
|
||||
|
||||
`chown {{[-R|--recursive]}} {{user}} {{path/to/directory}}`
|
||||
`sudo chown {{[-R|--recursive]}} {{user}} {{path/to/directory}}`
|
||||
|
||||
- Change the owner of a symbolic link:
|
||||
|
||||
`chown {{[-h|--no-dereference]}} {{user}} {{path/to/symlink}}`
|
||||
`sudo chown {{[-h|--no-dereference]}} {{user}} {{path/to/symlink}}`
|
||||
|
||||
- Change the owner of a file/directory to match a reference file:
|
||||
|
||||
`chown --reference {{path/to/reference_file}} {{path/to/file_or_directory}}`
|
||||
`sudo chown --reference {{path/to/reference_file}} {{path/to/file_or_directory}}`
|
||||
|
||||
41
tldr/linux/ark-survival-ascended
Normal file
41
tldr/linux/ark-survival-ascended
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ARK: Survival Ascended
|
||||
|
||||
> Create and start a headless ARK: Survival Ascended server.
|
||||
> More information: <https://ark.wiki.gg/wiki/Server_configuration>.
|
||||
|
||||
- Start the server with a specific map:
|
||||
|
||||
`{{path/to/ArkAscendedServer}} {{TheIsland_WP}}`
|
||||
|
||||
- Start the server with a specific session name, server password, and admin password:
|
||||
|
||||
`{{path/to/ArkAscendedServer}} {{TheIsland_WP}}?SessionName={{session_name}}?ServerPassword={{server_password}}?ServerAdminPassword={{admin_password}}`
|
||||
|
||||
- Start the server with a specific port and set a maximum player count:
|
||||
|
||||
`{{path/to/ArkAscendedServer}} {{TheIsland_WP}} -port={{7777}} -WinLiveMaxPlayers={{1..70}}`
|
||||
|
||||
- Enable PvE and disabling PvP:
|
||||
|
||||
`{{path/to/ArkAscendedServer}} {{TheIsland_WP}}?ServerPVE=true`
|
||||
|
||||
- Set a multiplier to scale the server difficulty, affecting the maximum level of wild creatures:
|
||||
|
||||
`{{path/to/ArkAscendedServer}} {{TheIsland_WP}}?DifficultyOffset={{1.0}}`
|
||||
|
||||
- Disable creature animation optimization to prevent collision issues:
|
||||
|
||||
`{{path/to/ArkAscendedServer}} {{TheIsland_WP}} -AlwaysTickDedicatedSkeletalMeshes`
|
||||
|
||||
- Enable specific mods by their ID (comma-separated):
|
||||
|
||||
`{{path/to/ArkAscendedServer}} {{TheIsland_WP}} -mods={{mod_id1, mod_id2, ...}}`
|
||||
|
||||
- Allow connections from specific platforms:
|
||||
|
||||
`{{path/to/ArkAscendedServer}} {{TheIsland_WP}} -ServerPlatform={{PC+XSX+PS5}}`
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Start the partition manipulator with a specific device:
|
||||
|
||||
`cfdisk {{/dev/sdX}}`
|
||||
`sudo cfdisk {{/dev/sdX}}`
|
||||
|
||||
- Create a new partition table for a specific device and manage it:
|
||||
|
||||
`cfdisk {{[-z|--zero]}} {{/dev/sdX}}`
|
||||
`sudo cfdisk {{[-z|--zero]}} {{/dev/sdX}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Change the volume label on a specific ext partition:
|
||||
|
||||
`e2label {{/dev/sda1}} "{{label_name}}"`
|
||||
`sudo e2label {{/dev/sda1}} "{{label_name}}"`
|
||||
|
||||
@@ -11,12 +11,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Build a Linux ext2 filesystem on a partition:
|
||||
|
||||
`mkfs {{/dev/sdXY}}`
|
||||
`sudo mkfs {{/dev/sdXY}}`
|
||||
|
||||
- Build a filesystem of a specified type:
|
||||
|
||||
`mkfs {{[-t|--type]}} {{ext4}} {{/dev/sdXY}}`
|
||||
`sudo mkfs {{[-t|--type]}} {{ext4}} {{/dev/sdXY}}`
|
||||
|
||||
- Build a filesystem of a specified type and check for bad blocks:
|
||||
|
||||
`mkfs -c {{[-t|--type]}} {{ntfs}} {{/dev/sdXY}}`
|
||||
`sudo mkfs -c {{[-t|--type]}} {{ntfs}} {{/dev/sdXY}}`
|
||||
|
||||
@@ -8,10 +8,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Create a ROM filesystem inside a partition.
|
||||
> More information: <https://manned.org/mkfs.cramfs>.
|
||||
|
||||
- Create a ROM filesystem inside partition Y on device X:
|
||||
- Create a ROM filesystem out of a directory inside partition Y on device X:
|
||||
|
||||
`mkfs.cramfs {{/dev/sdXY}}`
|
||||
`sudo mkfs.cramfs {{path/to/directory}} {{/dev/sdXY}}`
|
||||
|
||||
- Create a ROM filesystem with a volume-name:
|
||||
|
||||
`mkfs.cramfs -n {{volume_name}} {{/dev/sdXY}}`
|
||||
`sudo mkfs.cramfs -n {{volume_name}} {{path/to/directory}} {{/dev/sdXY}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create an exfat filesystem inside partition Y on device X:
|
||||
|
||||
`mkfs.exfat {{/dev/sdXY}}`
|
||||
`sudo mkfs.exfat {{/dev/sdXY}}`
|
||||
|
||||
- Create filesystem with a volume-name:
|
||||
|
||||
`mkfs.exfat {{[-L|--volume-label]}} {{volume_name}} {{/dev/sdXY}}`
|
||||
`sudo mkfs.exfat {{[-L|--volume-label]}} {{volume_name}} {{/dev/sdXY}}`
|
||||
|
||||
- Create filesystem with a volume-id:
|
||||
|
||||
`mkfs.exfat {{[-U|--volume-guid]}} {{volume_id}} {{/dev/sdXY}}`
|
||||
`sudo mkfs.exfat {{[-U|--volume-guid]}} {{volume_id}} {{/dev/sdXY}}`
|
||||
|
||||
@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a fat filesystem inside partition `Y` on device `X`:
|
||||
|
||||
`mkfs.fat {{/dev/sdXY}}`
|
||||
`sudo mkfs.fat {{/dev/sdXY}}`
|
||||
|
||||
- Create filesystem with a volume-name:
|
||||
|
||||
`mkfs.fat -n {{volume_name}} {{/dev/sdXY}}`
|
||||
`sudo mkfs.fat -n {{volume_name}} {{/dev/sdXY}}`
|
||||
|
||||
- Create filesystem with a volume-id:
|
||||
|
||||
`mkfs.fat -i {{volume_id}} {{/dev/sdXY}}`
|
||||
`sudo mkfs.fat -i {{volume_id}} {{/dev/sdXY}}`
|
||||
|
||||
- Use 5 instead of 2 file allocation tables:
|
||||
- Use 4 instead of 2 file allocation tables:
|
||||
|
||||
`mkfs.fat -f 5 {{/dev/sdXY}}`
|
||||
`sudo mkfs.fat -f 4 {{/dev/sdXY}}`
|
||||
|
||||
- Specify filesystem type:
|
||||
|
||||
`mkfs.fat -F {{12|16|32}} {{/dev/sdXY}}`
|
||||
`sudo mkfs.fat -F {{12|16|32}} {{/dev/sdXY}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a Minix filesystem inside partition Y on device X:
|
||||
|
||||
`mkfs.minix {{/dev/sdXY}}`
|
||||
`sudo mkfs.minix {{/dev/sdXY}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a NTFS filesystem inside partition Y on device X:
|
||||
|
||||
`mkfs.ntfs {{/dev/sdXY}}`
|
||||
`sudo mkfs.ntfs {{/dev/sdXY}}`
|
||||
|
||||
- Create filesystem with a volume-label:
|
||||
|
||||
`mkfs.ntfs {{[-L|--label]}} {{volume_label}} {{/dev/sdXY}}`
|
||||
`sudo mkfs.ntfs {{[-L|--label]}} {{volume_label}} {{/dev/sdXY}}`
|
||||
|
||||
- Create filesystem with specific UUID:
|
||||
|
||||
`mkfs.ntfs {{[-U|--with-uuid]}} {{UUID}} {{/dev/sdXY}}`
|
||||
`sudo mkfs.ntfs {{[-U|--with-uuid]}} {{UUID}} {{/dev/sdXY}}`
|
||||
|
||||
@@ -11,12 +11,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Disable a given swap area:
|
||||
|
||||
`swapoff {{path/to/file}}`
|
||||
`sudo swapoff {{path/to/file}}`
|
||||
|
||||
- Disable all swap areas in `/proc/swaps`:
|
||||
|
||||
`swapoff {{[-a|--all]}}`
|
||||
`sudo swapoff {{[-a|--all]}}`
|
||||
|
||||
- Disable a swap partition by its label:
|
||||
|
||||
`swapoff -L {{label}}`
|
||||
`sudo swapoff -L {{label}}`
|
||||
|
||||
@@ -15,12 +15,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Enable a given swap area:
|
||||
|
||||
`swapon {{path/to/file}}`
|
||||
`sudo swapon {{path/to/file}}`
|
||||
|
||||
- Enable all swap areas specified in `/etc/fstab` except those with the `noauto` option:
|
||||
|
||||
`swapon {{[-a|--all]}}`
|
||||
`sudo swapon {{[-a|--all]}}`
|
||||
|
||||
- Enable a swap partition by its label:
|
||||
|
||||
`swapon -L {{label}}`
|
||||
`sudo swapon -L {{label}}`
|
||||
|
||||
@@ -10,32 +10,32 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Install Ventoy to a specific drive with the defaults:
|
||||
|
||||
`ventoy -i {{/dev/sdX}}`
|
||||
`sudo ventoy -i {{/dev/sdX}}`
|
||||
|
||||
- Install Ventoy with GPT partition style instead of MBR:
|
||||
|
||||
`ventoy -i -g {{/dev/sdX}}`
|
||||
`sudo ventoy -i -g {{/dev/sdX}}`
|
||||
|
||||
- Install Ventoy with GPT partition style and a custom partition label and secure boot disabled:
|
||||
|
||||
`ventoy -i -g -S -L {{LABEL_NAME}} {{/dev/sdX}}`
|
||||
`sudo ventoy -i -g -S -L {{LABEL_NAME}} {{/dev/sdX}}`
|
||||
|
||||
- Install Ventoy and reserve space at the end of the disk:
|
||||
|
||||
`ventoy -i -r {{SIZE_MB}} {{/dev/sdX}}`
|
||||
`sudo ventoy -i -r {{SIZE_MB}} {{/dev/sdX}}`
|
||||
|
||||
- Force install Ventoy (overwrites existing installation):
|
||||
|
||||
`ventoy -I {{/dev/sdX}}`
|
||||
`sudo ventoy -I {{/dev/sdX}}`
|
||||
|
||||
- Update Ventoy on a drive:
|
||||
|
||||
`ventoy -u {{/dev/sdX}}`
|
||||
`sudo ventoy -u {{/dev/sdX}}`
|
||||
|
||||
- Display Ventoy information for a drive:
|
||||
|
||||
`ventoy -l {{/dev/sdX}}`
|
||||
`sudo ventoy -l {{/dev/sdX}}`
|
||||
|
||||
- Try non-destructive installation if possible (Ventoy will not reformat the disk):
|
||||
|
||||
`ventoy -i -n {{/dev/sdX}}`
|
||||
`sudo ventoy -i -n {{/dev/sdX}}`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Change the password of a specific user:
|
||||
|
||||
`passwd {{username}}`
|
||||
`sudo passwd {{username}}`
|
||||
|
||||
- Get the current status of the user:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user