1

unix 命令“file -i”能够识别哪些文件编码?

手册页不存在“file -i”能够识别的可能文件编码。

4

1 回答 1

2

I don't know whart your system has necessarily. /usr/share/misc/magic has the patterns that the file command uses to identify file flavors. You can edit that file and see what is available.

The file -i outputs information in mime format. But file can only determine file types based on the magic file, not the output types, because the output is mime encoded. I would take one of each flavor of file that you and see what you get for output.

You do realize that there are many platforms represented in the magic file, so enumerating everything would be both an antique-collecting activity and an incredible effort. That may be why google does not find much.

Got an old acorn?

于 2013-03-08T03:54:50.813 回答