Solved

Run C from Terminal

Posted on 2011-09-14
3
303 Views
Last Modified: 2016-02-10
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
0
Comment
Question by:chipped
  • 2
3 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 36535824

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

wmp
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 36535849
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
 

Author Closing Comment

by:chipped
ID: 36535926
God damn, I knew it would be something this easy.

Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Upload image to asp.net server using Swift 2 in  iOS 12 381
iPhone 5s Went Crazy 23 140
exchange support of mac 2 66
Changing Apple ID due to defunct email address 7 44
Apple's Mac OS X has become an official member of the malware club. The Flashback Trojan has affected over half million Macs, worldwide. It is behavior that ultimately gets malware onto a person’s computer. Obsolete or out-of-date software helps…
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now