首页 > 其他 > 详细

如何查看文件的编码

时间:2017-05-18 18:31:08      阅读:385      评论:0      收藏:0      [点我收藏+]

https://www.shellhacks.com/linux-check-change-file-encoding/

在某一个目录下,直接执行file *

 

$ file *
chucklu.autoend.js: HTML document, UTF-8 Unicode text, with very long lines, with CRLF line terminators
custom.css: UTF-8 Unicode text, with CRLF line terminators
SimpleMemory.css: UTF-8 Unicode text, with CRLF line terminators

 

$ file *
chucklu.autoend.js: HTML document, Little-endian UTF-16 Unicode text, with very long lines, with CRLF line terminators
custom.css: UTF-8 Unicode text, with CRLF line terminators
SimpleMemory.css: UTF-8 Unicode text, with CRLF line terminators

 

$ file -bi chucklu.autoend.js
text/html; charset=utf-8

 

$ file -bi custom.css
text/plain; charset=utf-8

 

-b,--brief   Don’t print filename (brief mode)

-i, --mime   Print filetype and encoding

 

如何查看文件的编码

原文:http://www.cnblogs.com/chucklu/p/6874820.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!