Run C from Terminal

Hey people,

I'm not a programmer or coder, someone just gave me a binary and C source file. I'm just trying to run it from terminal and I'm getting "command not found.

I copied the binary and C source file to my root (file names are "sector_size.c" and "sector_size", and this is what I do from Terminal

thanasimacpro:/ thanasikala$ cd /
thanasimacpro:/ thanasikala$ sudo ./sector_size /dev/disk0
Password:
sudo: ./sector_size: command not found
thanasimacpro:/ thanasikala$ 

Open in new window


Ideas?

Thanks
chippedAsked:
Who is Participating?
 
woolmilkporcConnect With a Mentor Commented:

You should issue "sudo chmod +x ./sector_size" beforehand!

wmp
0
 
woolmilkporcCommented:
Is "sector_size" indeed present in / ?
Is it really a binary, or is it a script with a wrong shebang line (#!/...) at the top?
0
 
chippedAuthor Commented:
God damn, I knew it would be something this easy.

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.