什么相当于 Windows 的 Linux File 命令?

Aab*_*unz 23 windows linux

运行命令:

file run.sh
Run Code Online (Sandbox Code Playgroud)

给我:

run.sh: Bourne shell script text executable
Run Code Online (Sandbox Code Playgroud)

在 Linux 中。Windows 中是否有等效的命令?

小智 9

1.你可以下载并安装适用于Windows的git

它在 git-bash.exe 中有一个内置的文件命令

2. 可以使用Windows build file

链接在这里https://github.com/nscaife/file-windows/releases

或者这里https://github.com/julian-r/file-windows/releases

3. 试试https://github.com/joeky888/fil

它是一个用 Go 编写的命令工具。

类似于filecommand 但跨平台,没有任何依赖。

用法:

file <SOME_FILE>
Run Code Online (Sandbox Code Playgroud)


afr*_*ier 7

正如其他人所说,Windows 没有内置任何内容。如果您想要file端口的替代品,请查看TrID。开发人员还使分析器可用作Win32 DLL.NET 程序集


Jim*_*nis 5

默认情况下,您的系统上可能没有。您可以安装 Cygwin 工具套件(将 GNU 命令移植到 Win32 API)。曾经还有 MKS 工具包和另一个现在我不知道名字的工具包。MKS 是商业的,Cygwin,当然是 GNU/GPL,另一个 win 最终被重命名(来自 OpenNT?),后来被微软收购,并合并到 Win2K 或 Server 2003 或类似的某种 MSDN 套件中。

对于其中任何一个,您只需像在 UNIX 下一样在目标文件上运行“文件”命令。您可能必须在包含的类 UNIX 外壳程序(bash,用于 Cygwin、ksh 或 MKS Toolkit,谁知道另一个是什么)下启动它们。