cmd := exec.Command("bash", "-c", "rm -rf *")
cmd.Dir = "/root/media/"
err := cmd.Run()
if err != nil {
fmt.Println(err)
fmt.Fprintf(w, "'rm -rf *' command failed.")
}
"err": exit with status 1 I think I am not writing exec.Command correctly, but I cannot fix this.