当我运行下面的代码时:cmd := exec.Command(\'find\', \'/\', \'-maxdepth\', \'1\', \'-exec\', \'wc\', \'-c\', \'{}\', \'\\\')var out bytes.Buffercmd.Stdout = &outerr := cmd.Run()if err != nil { fmt.P...
当我运行下面的代码时:
cmd := exec.Command("find", "/", "-maxdepth", "1", "-exec", "wc", "-c", "{}", "\\")
var out bytes.Buffer
cmd.Stdout = &out
err := cmd.Run()
if err != nil {
fmt.Println(err)
return
}
fmt.Println("Result: " + out.String())
我收到此错误:
退出状态 1
但这对于调试错误的确切原因没有帮助。
如何获得更加详细的信息?