From ba503ae8fcc53cbec52bcb72459c798eda0b26e3 Mon Sep 17 00:00:00 2001 From: Yaron Haviv Date: Sun, 24 Mar 2019 15:40:24 +0200 Subject: [PATCH] update readme and flags --- README.md | 14 +++++++++++--- xcp.go | 4 +++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 13b5d0e..4fc5420 100644 --- a/README.md +++ b/README.md @@ -29,23 +29,31 @@ URL examples: /opt/xyz c:\windows\path ``` +
+ +> Note: +S3 credentials can be loaded from the standard environment variables (`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`)
+v3io URL and credentials can be loaded from environment variables (`V3IO_API`, `V3IO_USERNAME`, `V3IO_PASSWORD`, `V3IO_ACCESS_KEY`) + #### Flags ``` + -r + Recursive (go over child dirs) -f string filter string e.g. *.png -hidden include hidden files (start with '.') + -empty + include empty files (size=0) -m int maximum file size -n int minimum file size - -r - Recursive (go over child dirs) -t string minimal file time e.g. 'now-7d' or RFC3339 date -v string log level: info | debug (default "debug") -w int - num of worker routines (default 1) + num of worker routines (default 8) ``` diff --git a/xcp.go b/xcp.go index 75eea00..48a0c40 100644 --- a/xcp.go +++ b/xcp.go @@ -13,9 +13,10 @@ func main() { recursive := flag.Bool("r", false, "Recursive (go over child dirs)") hidden := flag.Bool("hidden", false, "include hidden files (start with '.')") + copyEmpty := flag.Bool("empty", false, "include empty files (size=0), ignored by default") maxSize := flag.Int("m", 0, "maximum file size") minSize := flag.Int("n", 0, "minimum file size") - workers := flag.Int("w", 1, "num of worker routines") + workers := flag.Int("w", 8, "num of worker routines") filter := flag.String("f", "", "filter string e.g. *.png") logLevel := flag.String("v", "debug", "log level: info | debug") mtime := flag.String("t", "", "minimal file time e.g. 'now-7d' or RFC3339 date") @@ -51,6 +52,7 @@ func main() { MaxSize: int64(*maxSize), MinSize: int64(*minSize), Hidden: *hidden, + CopyEmpty: *copyEmpty, } if err := copydir.RunTask(&task, logger, *workers); err != nil {