Once I navigate to a certain directory that has a .command file in it, how do I execute that file using Terminal?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to execute it as if it was double-clicked in the Finder, you can use
open foo.command. This will spawn a new Terminal window. If you want to execute it “inline”, as it were, you can just use./foo.command, as .command files must have the exec bit set in order to function.