From 823e0c009c9bfc0b9d3a834a98e3d56b7844d66f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 7 Apr 2019 19:02:43 -0700 Subject: [PATCH] rsync --progress works Signed-off-by: Jeff Carr --- random-output/main.go | 4 +++- random-output/shell.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/random-output/main.go b/random-output/main.go index 78af4ae..170be59 100644 --- a/random-output/main.go +++ b/random-output/main.go @@ -14,5 +14,7 @@ func main() { // shellRAW("localhost", 5) // simpleProcess("ping -c 10 localhost") - shell("ping localhost -c 5", 10) + // shell("ping localhost -c 5", 10) + // shell("if=/home/pinebook/factory/factory-pine14inch of=/dev/sdb2 status=progress bs=1M oflag=sync count=300", 10) + shell("rsync -av --progress --inplace /home/pinebook/factory/factory-pine14inch work3.lab.wit.com:/home/pinebook/factory/") } diff --git a/random-output/shell.go b/random-output/shell.go index ff3cbeb..1c1c599 100644 --- a/random-output/shell.go +++ b/random-output/shell.go @@ -14,7 +14,7 @@ import "github.com/davecgh/go-spew/spew" import "github.com/svent/go-nbreader" -func shell(cmdline string, count int) { +func shell(cmdline string) { cmdArgs := strings.Fields(cmdline) cmd := exec.Command(cmdArgs[0], cmdArgs[1:len(cmdArgs)]...)