From 77fd881bac1b1c0346869dc247f4ec8cefde1a35 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Tue, 11 Jun 2024 00:14:23 +0000 Subject: [PATCH] Update cheatsheets --- tldr/dd | 8 ++++---- tldr/git-contrib | 2 +- tldr/linux/dd | 6 +++--- tldr/neo4j-admin | 37 +++++++++++++++++++++++++++++++++++++ tldr/osx/dd | 18 +++++++----------- tldr/rkdeveloptool | 35 +++++++++++++++++++++++++++++++++++ 6 files changed, 87 insertions(+), 19 deletions(-) create mode 100644 tldr/neo4j-admin create mode 100644 tldr/rkdeveloptool diff --git a/tldr/dd b/tldr/dd index 9fcfe502..b0a7f089 100644 --- a/tldr/dd +++ b/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`): -`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: -`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: @@ -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}}` -- 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` diff --git a/tldr/git-contrib b/tldr/git-contrib index 5113cc53..938abd41 100644 --- a/tldr/git-contrib +++ b/tldr/git-contrib @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # git contrib -> Display commits from a author. +> Display commits from an author. > Part of `git-extras`. > More information: . diff --git a/tldr/linux/dd b/tldr/linux/dd index 686054f7..27a1a431 100644 --- a/tldr/linux/dd +++ b/tldr/linux/dd @@ -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: -`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: @@ -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}}` -- 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): diff --git a/tldr/neo4j-admin b/tldr/neo4j-admin new file mode 100644 index 00000000..621986a3 --- /dev/null +++ b/tldr/neo4j-admin @@ -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: . + +- 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` diff --git a/tldr/osx/dd b/tldr/osx/dd index 892e3003..9811b144 100644 --- a/tldr/osx/dd +++ b/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: -`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: -`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: -`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` - -- Restore a drive from an IMG file and show the progress: - -`dd if={{path/to/file.img}} of={{/dev/drive_device}} status=progress` +`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): diff --git a/tldr/rkdeveloptool b/tldr/rkdeveloptool new file mode 100644 index 00000000..d80dab95 --- /dev/null +++ b/tldr/rkdeveloptool @@ -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: . + +- [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`