Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

blasetheodore

macrumors newbie
Original poster
(Mods please move this if its better suited elsewhere)

I've googled this to no avail.

I have a file (no extension) which I was instructed to run with:

sudo ./file

However doing so gives me

sudo: ./file: command not found

I'm not too terminal savvy, but I tried switching to bash, and ran it again with the same error.
I re-installed the BSD components, but had no luck.
sudo ls or sudo cd work fine.
The file itself is in the ~/ directory.

echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin
echo $SHELL
/bin/bash

Anyone know what could cause this?

Thanks,
Blase
 
(Mods please move this if its better suited elsewhere)

I've googled this to no avail.

I have a file (no extension) which I was instructed to run with:

sudo ./file

However doing so gives me

sudo: ./file: command not found

I'm not too terminal savvy, but I tried switching to bash, and ran it again with the same error.
I re-installed the BSD components, but had no luck.
sudo ls or sudo cd work fine.
The file itself is in the ~/ directory.

echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin
echo $SHELL
/bin/bash

Anyone know what could cause this?

Thanks,
Blase

First you need to check if you can execute the file using ls -l file.
See the permissions and run the file by doing ./file.

That's it. If you have any question, please post the output of your terminal and I'll try to help.
--
Emerson Takahashi
 
Thanks aristobrat & setatakahashi!

Yeah, that fixed it.

Thanks guys, that was a bigger deal than you'd imagine. On behalf of all us noobs who walk in here without a clue, thanks for being so courteous and helpful.

Take care,
Blase
 
Yeah, that fixed it.

Thanks guys, that was a bigger deal than you'd imagine. On behalf of all us noobs who walk in here without a clue, thanks for being so courteous and helpful.

Take care,
Blase

No problem 😱 .

I figured out because you said: "I have a file (no extension) which *I was instructed* to run with".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.