【发布时间】:2011-11-14 05:25:43
【问题描述】:
当我跑步时
file -bi 'filename'
在 CentOS 中对于 3GP、3GPP2 等文件,返回值为空。对于 JPEG、GIF、MPEG 等其他文件,该命令返回正确的 MIME 类型。为什么会这样?
谢谢!
【问题讨论】:
当我跑步时
file -bi 'filename'
在 CentOS 中对于 3GP、3GPP2 等文件,返回值为空。对于 JPEG、GIF、MPEG 等其他文件,该命令返回正确的 MIME 类型。为什么会这样?
谢谢!
【问题讨论】:
【讨论】:
The environment variable MAGIC can be used to set the default magic number file name. If that variable is set, then file will not attempt to open $HOME/.magic . file adds ".mime" and/or ".mgc" to the value of this variable as appropriate. 所以设置$MAGIC 或创建一个$HOME/.magic 文件。