-3

I am trying to run the command: $ sudo ./mk2partsd /dev/sdb

mk2partsd is this file: https://github.com/gumstix/meta-gumstix-extras/blob/dizzy/scripts/mk2partsd

I get this error:

sudo: ./mk2partsd: command not found

mk2partsd is saved on my Desktop and a navigate there with cd Desktop I tried saving the file with the extentions of .c and .sh and running but same output

DYZ
  • 55,249
  • 10
  • 64
  • 93
Rasheed Billy
  • 35
  • 1
  • 1
  • 2
  • You should be calling the actual filename. If you called it xxx.c then sudo xxx.c - but why you added a random .c to the end I have no idea. .sh makes more sense - sudo xxx.sh. Another possibility would be a corrupt `#!` at the start of the file (I haven't looked at the file) – John3136 Apr 12 '18 at 23:21

1 Answers1

0
  1. Most probably your script file is not executable. Make it executable with chmod u+x ./mk2partsd and try again.

  2. Alternatively, start the script as a parameter to the shell: sudo sh ./mk2partsd /dev/sdb.

  3. The name or extension of the file do not matter, but .sh would be the best.

DYZ
  • 55,249
  • 10
  • 64
  • 93