Running the command:
run.sh: Bourne shell script text executable
in Linux. Is there an equivalent command in Windows?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
There probably isn't one on your system by default. You could install the Cygwin tools suite (ports of GNU commands to the Win32 APIs). There used to also be the MKS Toolkit and another one whose name escapes me at the moment. MKS was commercial, Cygwin, of course was GNU/GPL, and the other won was eventually renamed (from OpenNT?) and later acquired by Microsoft and incorporated into some sort of MSDN suite for Win2K or Server 2003 or something like that.
For any of those you'd just run the 'file' command on your target files just as you would under UNIX. You might have to start them under the included UNIX-like shell (bash, for Cygwin, ksh or MKS Toolkit, and who knows what for the other one).
It has a built-in file command in git-bash.exe
It is a command tool written in Go.
file command but cross-platform without any dependency.
On Windows 10, you can now install Bash. Once that's installed, you'll have access to the same File command that Ubuntu uses. It might be a bit overkill to do all this just for the one command, but I find it quite useful.
If you want the file command without installing all of Cygwin, you can pick up a copy from the GnuWin project. It's an older build but still useful:
Take a look at File.exe - a small program similar to the Unix / Linux file executable which can examine files, in this case it is designed to query an executable file and display the processor that the file was compiled to run on and any other details it can report on.
If you have WSL installed, you can simply use the
file command on Windows file system folder
file /mnt/c/"Program Files"/Notepad++/notepad++.exe
The output will be something similar to:
/mnt/c/Program Files/Notepad++/notepad++.exe: PE32+ executable (GUI) x86-64, for MS Windows