return 0
return 0

Reputation: 4396

How to run a binary file in shell that's not in current directory?

I have a binary file that's not in the current directly, I want to execute this binary file from shell.

For example, the binary file is bin.exe, and it is located in C:/a/b/c/bin.exe

If I am now at C:/, how do I execute it in shell? Thanks.

EDIT: In Unix Bash Shell

Upvotes: 1

Views: 194

Answers (1)

Andrei B
Andrei B

Reputation: 2770

Just like you said, just type:

C:/a/b/c/bin.exe

Note that / works for some versions of Windows (like Pro versions), but don't for others (like Home versions). A safer method is to use

C:\a\b\c\bin.exe

Upvotes: 1

Related Questions