From 80a87929b0c0a8dba3f80ab1b6cdb96b317f6e31 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 10 Nov 2021 18:18:34 +0100 Subject: [PATCH] Improve CLI documentation --- doc/book/src/connect/cli.md | 49 +++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/doc/book/src/connect/cli.md b/doc/book/src/connect/cli.md index 3fc11aad..c78ed305 100644 --- a/doc/book/src/connect/cli.md +++ b/doc/book/src/connect/cli.md @@ -90,10 +90,10 @@ aws s3 cp s3/my_files/cpuinfo.txt /tmp/cpuinfo.txt ## `rclone` -`rclone` can be configured using the interactive assistant invoked using `rclone configure`. +`rclone` can be configured using the interactive assistant invoked using `rclone config`. You can also configure `rclone` by writing directly its configuration file. -Here is a template `rclone.ini` configuration file: +Here is a template `rclone.ini` configuration file (mine is located at `~/.config/rclone/rclone.conf`): ```ini [garage] @@ -109,9 +109,25 @@ acl = private bucket_acl = private ``` -## Cyberduck +Now you can run: -TODO +```bash +# list buckets +rclone lsd garage: + +# list objects of a bucket aggregated in directories +rclone lsd garage:my-bucket + +# copy from your filesystem to garage +echo hello world > /tmp/hello.txt +rclone copy /tmp/hello.txt garage:my-bucket/ + +# copy from garage to your filesystem +rclone copy garage:quentin.divers/hello.txt . + +# see all available subcommands +rclone help +``` ## `s3cmd` @@ -123,5 +139,28 @@ access_key = secret_key = host_base = host_bucket = -use_https = False | True +use_https = ``` + +And use it as follow: + +```bash +# List buckets +s3cmd ls + +# s3cmd objects inside a bucket +s3cmd ls s3://my-bucket + +# copy from your filesystem to garage +echo hello world > /tmp/hello.txt +s3cmd put /tmp/hello.txt s3://my-bucket/ + +# copy from garage to your filesystem +s3cmd get s3://my-bucket/hello.txt hello.txt +``` + +## Cyberduck & duck + +TODO + +