From c9b3ef58dea146e8a39a6c78c0aba4354c1d3d08 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 21 Nov 2018 15:15:40 -0800 Subject: [PATCH] options to control filer.export verbosity --- weed/command/filer_export.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/weed/command/filer_export.go b/weed/command/filer_export.go index 8a709ed1f..14465d61b 100644 --- a/weed/command/filer_export.go +++ b/weed/command/filer_export.go @@ -37,6 +37,7 @@ var ( dir = cmdFilerExport.Flag.String("dir", "/", "only process files under this directory") dirListLimit = cmdFilerExport.Flag.Int("dirListLimit", 100000, "limit directory list size") dryRun = cmdFilerExport.Flag.Bool("dryRun", false, "not actually moving data") + verboseFilerExport = cmdFilerExport.Flag.Bool("v", false, "verbose entry details") ) type statistics struct { @@ -170,14 +171,16 @@ func printout(level int, entry *filer2.Entry) error { } } print(entry.FullPath.Name()) - for _, chunk:=range entry.Chunks{ - print("[") - print(chunk.FileId) - print(",") - print(chunk.Offset) - print(",") - print(chunk.Size) - print(")") + if *verboseFilerExport{ + for _, chunk := range entry.Chunks { + print("[") + print(chunk.FileId) + print(",") + print(chunk.Offset) + print(",") + print(chunk.Size) + print(")") + } } println() return nil