将 `file` 命令升级到 mac os 中的最新版本

upgrade `file` command to latest version in mac os

我的 OSX 当前 file 命令 计算机是:

$ file -v
file-5.04
magic file from /usr/share/file/magic

在我的 ubuntu 服务器上:

$ file -v
file-5.14
magic file from /etc/magic:/usr/share/misc/magic

如何在macos中升级?

我尝试使用 brew install file-formula,但出现错误 Error: No available formula for file-formula

如果你去 here 你可以点击 FTP link 并下载 5.22 版本。