How to run an "unix executable file" on mac?

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

1 Answer

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like