mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-13 05:59:16 +00:00
Update cheatsheets
This commit is contained in:
8
tldr/dd
8
tldr/dd
@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Make a bootable USB drive from an isohybrid file (such as `archlinux-xxx.iso`):
|
- Make a bootable USB drive from an isohybrid file (such as `archlinux-xxx.iso`):
|
||||||
|
|
||||||
`dd if={{path/to/file.iso}} of=/dev/{{usb_drive}}`
|
`dd if={{path/to/file.iso}} of={{/dev/usb_drive}}`
|
||||||
|
|
||||||
- Clone a drive to another drive with 4 MiB block size and flush writes before the command terminates:
|
- Clone a drive to another drive with 4 MiB block size and flush writes before the command terminates:
|
||||||
|
|
||||||
`dd bs=4194304 conv=fsync if=/dev/{{source_drive}} of=/dev/{{dest_drive}}`
|
`dd bs=4194304 conv=fsync if={{/dev/source_drive}} of={{/dev/dest_drive}}`
|
||||||
|
|
||||||
- Generate a file with a specific number of random bytes by using kernel random driver:
|
- Generate a file with a specific number of random bytes by using kernel random driver:
|
||||||
|
|
||||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`dd bs={{1024}} count={{1000000}} if=/dev/zero of={{path/to/file_1GB}}`
|
`dd bs={{1024}} count={{1000000}} if=/dev/zero of={{path/to/file_1GB}}`
|
||||||
|
|
||||||
- Create a system backup and save it into an IMG file (can be restored later by swapping `if` and `of`):
|
- Create a system backup, save it into an IMG file (can be restored later by swapping `if` and `of`), and show the progress:
|
||||||
|
|
||||||
`dd if={{/dev/drive_device}} of={{path/to/file.img}}`
|
`dd if={{/dev/drive_device}} of={{path/to/file.img}} status=progress`
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
---
|
---
|
||||||
# git contrib
|
# git contrib
|
||||||
|
|
||||||
> Display commits from a author.
|
> Display commits from an author.
|
||||||
> Part of `git-extras`.
|
> Part of `git-extras`.
|
||||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-contrib>.
|
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-contrib>.
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Make a bootable USB drive from an isohybrid file (such as `archlinux-xxx.iso`) and show the progress:
|
- Make a bootable USB drive from an isohybrid file (such as `archlinux-xxx.iso`) and show the progress:
|
||||||
|
|
||||||
`dd status=progress if={{path/to/file.iso}} of={{/dev/usb_drive}}`
|
`dd if={{path/to/file.iso}} of={{/dev/usb_drive}} status=progress`
|
||||||
|
|
||||||
- Clone a drive to another drive with 4 MiB block size and flush writes before the command terminates:
|
- Clone a drive to another drive with 4 MiB block size and flush writes before the command terminates:
|
||||||
|
|
||||||
@@ -24,9 +24,9 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
`dd bs={{1M}} count={{1000000}} if=/dev/zero of={{path/to/file_1GB}}`
|
`dd bs={{1M}} count={{1000000}} if=/dev/zero of={{path/to/file_1GB}}`
|
||||||
|
|
||||||
- Create a system backup and save it into an IMG file (can be restored later by swapping `if` and `of`):
|
- Create a system backup, save it into an IMG file (can be restored later by swapping `if` and `of`), and show the progress:
|
||||||
|
|
||||||
`dd if={{/dev/drive_device}} of={{path/to/file.img}}`
|
`dd if={{/dev/drive_device}} of={{path/to/file.img}} status=progress`
|
||||||
|
|
||||||
- Check the progress of an ongoing `dd` operation (run this command from another shell):
|
- Check the progress of an ongoing `dd` operation (run this command from another shell):
|
||||||
|
|
||||||
|
|||||||
37
tldr/neo4j-admin
Normal file
37
tldr/neo4j-admin
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# neo4j-admin
|
||||||
|
|
||||||
|
> Manage and administer a Neo4j DBMS (Database Management System).
|
||||||
|
> More information: <https://neo4j.com/docs/operations-manual/current/tools/neo4j-admin/>.
|
||||||
|
|
||||||
|
- Start the DBMS:
|
||||||
|
|
||||||
|
`neo4j-admin server start`
|
||||||
|
|
||||||
|
- Stop the DBMS:
|
||||||
|
|
||||||
|
`neo4j-admin server stop`
|
||||||
|
|
||||||
|
- Set the initial password of the default `neo4j` user (prerequisite for the first start of the DBMS):
|
||||||
|
|
||||||
|
`neo4j-admin dbms set-initial-password {{database_name}}`
|
||||||
|
|
||||||
|
- Create an archive (dump) of an offline database to a file named `database_name.dump`:
|
||||||
|
|
||||||
|
`neo4j-admin database dump --to-path={{path/to/directory}} {{database_name}}`
|
||||||
|
|
||||||
|
- Load a database from an archive named `database_name.dump`:
|
||||||
|
|
||||||
|
`neo4j-admin database load --from-path={{path/to/directory}} {{database_name}} --overwrite-destination=true`
|
||||||
|
|
||||||
|
- Load a database from a specified archive file through `stdin`:
|
||||||
|
|
||||||
|
`neo4j-admin database load --from-stdin {{database_name}} --overwrite-destination=true < {{path/to/filename.dump}}`
|
||||||
|
|
||||||
|
- Display help:
|
||||||
|
|
||||||
|
`neo4j-admin --help`
|
||||||
18
tldr/osx/dd
18
tldr/osx/dd
@@ -10,27 +10,23 @@ source: https://github.com/tldr-pages/tldr.git
|
|||||||
|
|
||||||
- Make a bootable USB drive from an isohybrid file (such like `archlinux-xxx.iso`) and show the progress:
|
- Make a bootable USB drive from an isohybrid file (such like `archlinux-xxx.iso`) and show the progress:
|
||||||
|
|
||||||
`dd if={{path/to/file.iso}} of={{/dev/usb_device}} status=progress`
|
`dd if={{path/to/file.iso}} of={{/dev/usb_drive}} status=progress`
|
||||||
|
|
||||||
- Clone a drive to another drive with 4 MB block, ignore error and show the progress:
|
- Clone a drive to another drive with 4 MB block, ignore error and show the progress:
|
||||||
|
|
||||||
`dd if={{/dev/source_device}} of={{/dev/dest_device}} bs=4m conv=noerror status=progress`
|
`dd bs=4m conv=noerror if={{/dev/source_drive}} of={{/dev/dest_drive}} status=progress`
|
||||||
|
|
||||||
- Generate a file of 100 random bytes by using kernel random driver:
|
- Generate a file with a specific number of random bytes by using kernel random driver:
|
||||||
|
|
||||||
`dd if=/dev/urandom of={{path/to/random_file}} bs=100 count={{1}}`
|
`dd bs={{100}} count={{1}} if=/dev/urandom of={{path/to/random_file}}`
|
||||||
|
|
||||||
- Benchmark the write performance of a disk:
|
- Benchmark the write performance of a disk:
|
||||||
|
|
||||||
`dd if=/dev/zero of={{path/to/1GB_file}} bs={{1024}} count={{1000000}}`
|
`dd bs={{1024}} count={{1000000}} if=/dev/zero of={{path/to/1GB_file}}`
|
||||||
|
|
||||||
- Generate a system backup into an IMG file and show the progress:
|
- Create a system backup, save it into an IMG file (can be restored later by swapping `if` and `of`), and show the progress:
|
||||||
|
|
||||||
`dd if=/dev/{{drive_device}} of={{path/to/file.img}} status=progress`
|
`dd if={{/dev/drive_device}} of={{path/to/file.img}} status=progress`
|
||||||
|
|
||||||
- Restore a drive from an IMG file and show the progress:
|
|
||||||
|
|
||||||
`dd if={{path/to/file.img}} of={{/dev/drive_device}} status=progress`
|
|
||||||
|
|
||||||
- Check the progress of an ongoing `dd` operation (run this command from another shell):
|
- Check the progress of an ongoing `dd` operation (run this command from another shell):
|
||||||
|
|
||||||
|
|||||||
35
tldr/rkdeveloptool
Normal file
35
tldr/rkdeveloptool
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
syntax: markdown
|
||||||
|
tags: [tldr, common]
|
||||||
|
source: https://github.com/tldr-pages/tldr.git
|
||||||
|
---
|
||||||
|
# rkdeveloptool
|
||||||
|
|
||||||
|
> Flash, dump, and manage boot firmware for Rockchip-based computer devices.
|
||||||
|
> You will need to turn on the device into Maskrom/Bootrom mode before connecting it through USB.
|
||||||
|
> Some subcommands may require to run as root.
|
||||||
|
> More information: <https://github.com/rockchip-linux/rkdeveloptool>.
|
||||||
|
|
||||||
|
- [l]ist all connected Rockchip-based flash [d]evices:
|
||||||
|
|
||||||
|
`rkdeveloptool ld`
|
||||||
|
|
||||||
|
- Initialize the device by forcing it to [d]ownload and install the [b]ootloader from the specified file:
|
||||||
|
|
||||||
|
`rkdeveloptool db {{path/to/bootloader.bin}}`
|
||||||
|
|
||||||
|
- [u]pdate the boot[l]oader software with a new one:
|
||||||
|
|
||||||
|
`rkdeveloptool ul {{path/to/bootloader.bin}}`
|
||||||
|
|
||||||
|
- Write an image to a GPT-formatted flash partition, specifying the initial storage sector (usually `0x0` alias `0`):
|
||||||
|
|
||||||
|
`rkdeveloptool wl {{initial_sector}} {{path/to/image.img}}`
|
||||||
|
|
||||||
|
- Write to the flash partition by its user-friendly name:
|
||||||
|
|
||||||
|
`rkdeveloptool wlx {{partition_name}} {{path/to/image.img}}`
|
||||||
|
|
||||||
|
- [r]eset/reboot the [d]evice, exit from the Maskrom/Bootrom mode to boot into the selected flash partition:
|
||||||
|
|
||||||
|
`rkdeveloptool rd`
|
||||||
Reference in New Issue
Block a user