Solved

Run C from Terminal

Posted on 2011-09-14
3
306 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

iCloud Drive was introduced after iOS 8 was launched last year. This drive is Apple’s online storage device that lets users sync their files and access them from all their Apple devices.   There is a lot of data that is not automatically backed up…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
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.

773 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