tldr/pages.zh/common/file.md

25 lines
534 B
Markdown
Raw Normal View History

2019-02-26 03:13:08 +00:00
# file
> 确定文件类型。
> 更多信息:<https://manned.org/file>.
2019-02-26 03:13:08 +00:00
- 提供指定文件类型的描述,对于没有文件扩展名的文件可以正常工作:
2019-02-26 03:13:08 +00:00
`file {{文件名}}`
- 查看压缩文件并确定其中的文件类型:
2019-02-26 03:13:08 +00:00
`file -z {{xxx.zip}}`
- 允许文件与特殊文件或设备文件一起使用:
2019-02-26 03:13:08 +00:00
`file -s {{文件名}}`
- 不要在第一个文件类型匹配时停止;继续执行直到文件结束:
2019-02-26 03:13:08 +00:00
`file -k {{文件名}}`
2022-10-17 08:48:15 +01:00
- 确定文件的 MIME 编码类型:
2019-02-26 03:13:08 +00:00
`file -I {{文件名}}`