rsync --progress works

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-04-07 19:02:43 -07:00
parent b42c5c9d55
commit 823e0c009c
2 changed files with 4 additions and 2 deletions

View File

@ -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/")
}

View File

@ -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)]...)