[root@localhost bin]# file --help
Usage: file [OPTION...] [FILE...]
Determine type of FILEs.
--help display this help and exit
-v, --version output version information and exit
-m, --magic-file LIST use LIST as a colon-separated list of magic
number files
-z, --uncompress try to look inside compressed files
-b, --brief do not prepend filenames to output lines
-c, --checking-printout print the parsed form of the magic file, use in
conjunction with -m to debug a new magic file
before installing it
-e, --exclude TEST exclude TEST from the list of test to be
performed for file. Valid tests are:
ascii, apptype, compress, elf, soft, tar, tokens, troff
-f, --files-from FILE read the filenames to be examined from FILE
-F, --separator STRING use string as separator instead of `:'
-i, --mime output MIME type strings (--mime-type and
--mime-encoding)
--apple output the Apple CREATOR/TYPE
--mime-type output the MIME type
--mime-encoding output the MIME encoding
-k, --keep-going don't stop at the first match
-l, --list list magic strength
-L, --dereference follow symlinks (default)
-h, --no-dereference don't follow symlinks
-n, --no-buffer do not buffer output
-N, --no-pad do not pad output
-0, --print0 terminate filenames with ASCII NUL
-p, --preserve-date preserve access times on files
-r, --raw don't translate unprintable chars to \ooo
-s, --special-files treat special (block/char devices) files as
ordinary ones
-C, --compile compile file specified by -m
-d, --debug print debugging messages--文件夹
[root@localhost software]# file nginx-1.9.3
nginx-1.9.3: directory
--压缩包
[root@localhost software]# file jdk-7u79-linux-x64.gz
jdk-7u79-linux-x64.gz: gzip compressed data, from Unix, last modified: Fri Apr 10 11:53:41 2015
--DOS的bat文件
[root@localhost bin]# file startup.bat
startup.bat: DOS batch file, ASCII text, with CRLF line terminators
--Sheel脚本
[root@localhost bin]# file startup.sh
startup.sh: POSIX shell script, ASCII text executable
file判断文件类型
原创
©著作权归作者所有:来自51CTO博客作者mb64390262217c2的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:SQLRelay
下一篇:手动创建和挂载swap 分区
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
java 根据HttpEntity 中contenttype获取文件类型
java 根据HttpEntity 中contenttype获取文件类型
apache HTTP Apache -
file - 确定文件类型
FILE(1) &nb
file 确定文件类型