I'm trying to get the cksum of one file using Go by executing the command cksum
.
Getting the below error:
exec: "cksum": executable file not found in $PATH
Below is the code:
cmd := exec.Command("/bin/cksum",dst)
Thanks.
I'm trying to get the cksum of one file using Go by executing the command cksum
.
Getting the below error:
exec: "cksum": executable file not found in $PATH
Below is the code:
cmd := exec.Command("/bin/cksum",dst)
Thanks.
Most of the executable binaries are present under /usr/bin directory,so you need to modify your code as below.
cmd := exec.Command("/usr/bin/cksum",dst)