1

I have an "unix executable file" named install-sh in my /Users/$USERNAME/Downloads folder which I want to execute.

However if I open my terminal and execute the following commands (being in Downloads dir): install-sh (returns no input file specified) open install-sh (returns nothing but I do not see anything happening)

Both of them doesn't work.

I have also set my $PATH variable of my bash to include /Users/$USERNAME/Downloads directory.

Could someone please help me with understanding how to execute an unix executable file in mac?

Please let me know if you need any other information from my end. Thank you.

2
  • "no input file specified" sounds as if it expects you to give it the name of a file to work with. Perhaps someone from wherever you got the executable (script?) can tell you how it's supposed to be used. Commented Apr 4, 2022 at 19:43
  • if you want to execute a file by an terminal you need to add ./ before the name of file, in your case must be ./install-sh. You can specify the entirelly path without changing into the directory like that ./home/$(whoami)/Downloads/install-sh Commented Apr 4, 2022 at 20:17

1 Answer 1

1

You can try to type "cd" followed by a space, then drag and drop the executable file onto the terminal window. This will automatically change directory to where that file is located. Then type “./file_name”. This will execute the file in Terminal.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.