Skip to content

Commit

Permalink
update readme and flags
Browse files Browse the repository at this point in the history
  • Loading branch information
yaronha committed Mar 24, 2019
1 parent b320e38 commit ba503ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,31 @@ URL examples:
/opt/xyz
c:\windows\path
```
<br>

> Note:
S3 credentials can be loaded from the standard environment variables (`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`)<br>
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)
```
4 changes: 3 additions & 1 deletion xcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ba503ae

Please sign in to comment.