好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > 一天一個shell命令 linux文本系列-file命令用法

一天一個shell命令 linux文本系列-file命令用法

熱門標簽:德陽400電話申請 商機地圖標注 天津電話外呼系統排名 智能電銷機器人有用嗎 測繪地圖標注名稱 鶴崗400電話申請 外呼電話系統怎么操作 怎么在百度地圖標注公司的位置 百度地圖標注直線距離

linux file 命令簡介:

該命令用來識別文件類型,也可用來辨別一些文件的編碼格式。它是通過查看文件的頭部信息來獲取文件類型,而不是像Windows通過擴展名來確定文件類型的。

更多介紹可以查看這篇文章:https://www.jb51.net/LINUXjishu/388984.html

file 官方解釋:Determine type of FILEs. 判定文件的類型。

小知識:在UNIX/Linux系統中,文件類型并不是由擴展名決定的(Windows是的)。

開篇例子:

1. $file file.txt

輸出:file.txt: ASCII English text

注:file.txt是我用file –help gt; file.txt生成的幫助文檔

查看—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

解讀:

1. -z

查看壓縮文件內的信息

2. -b, -e, -i, –r

-b 去掉輸出行的前綴命名
-e 從測試列表到被執行文件排除測試。有效的測試包括:ascii, apptype, compress, elf, soft, tar,
-i 打印MIME
-R 不轉譯無法打印的字符為\ooo

3. magic file

以mgc為擴展名的文件,Microsoft office媒體目錄文件

實戰實例:

1. $file -z file.zip
查看file.zip包中的文件信息

2. $file –i file.txt
out:file.txt: text/plain; charset=us-ascii

打印MIME類型
 
$file file.txt
out:file.txt: ASCII English text

3. magic file

我翻譯起來實在蹩腳。。 只能猜測查看$which file 看看,沒有收獲。最終通過$file得到

Usage: file  [-bchikLlNnprsvz0] [--apple] [--mime-encoding] [--mime-type]
       [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
 file  -C [-m magicfiles]
 file  [--help]

然后嘗試file –C 得到magic.mgc文件。。。 不知有何用,慚愧

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       以冒號分割的魔法數字清單作為列表
                           
  -z, --uncompress           查看壓縮文件內容
  -b, --brief                不前綴文件名到輸出行里
  -c, --checking-printout    打印魔法文件的解析格式,安裝前,用-m debug一個新的魔法文件
                             
  -e, --exclude TEST         排除測試從測試列表到執行文件。有效的測試:ascii, apptype, compress, elf, soft, tar, tokens, troff
  -f, --files-from FILE      從已查的文檔中讀取文件名
  -F, --separator STRING     用String作為分隔器 代替 “:”
  -i, --mime                 輸出MIME類型的字符串 (--mime-type and
                               --mime-encoding)
         
      --apple                輸出蘋果類型 CREATOR/TYPE
      --mime-type            打印MIME類型
      --mime-encoding        打印 MIME 編碼
  -k, --keep-going           不停留在第一個匹配
  -l, --list                 列出magic深度
  -L, --dereference          跟隨符號鏈接(缺?。?br />   -h, --no-dereference       不跟隨符號鏈接
  -n, --no-buffer            不緩沖輸出
  -N, --no-pad               不打印輸出
  -0, --print0               NUL終止文件
  -p, --preserve-date        保持文件上的原訪問時間
  -r, --raw                  不轉移不可打印的字符到\ooo
  -s, --special-files        把特殊(塊/字符 設備)文件作為普通文件對待
  -C, --compile              編譯用-m指定的文件
  -d, --debug                打印調試信息

Report bugs to http://bugs.gw.com/

您可能感興趣的文章:
  • linux中無make命令的問題(make: *** 沒有指明目標并且找不到 makefile及make命令安裝方法)
  • Linux 中makefile的命令包定義及使用
  • Linux執行可執行文件提示No such file or directory的解決方法
  • Linux下環境變量配置方法小結(.bash_profile和.bashrc的區別)
  • Linux中文件描述符fd與文件指針FILE*互相轉換實例解析
  • Linux makefile 和shell文件相互調用實例詳解
  • Linux file命令的使用

標簽:滁州 百色 自貢 武漢 六盤水 丹東 優質小號 鎮江

巨人網絡通訊聲明:本文標題《一天一個shell命令 linux文本系列-file命令用法》,本文關鍵詞  一天,一個,shell,命令,linux,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《一天一個shell命令 linux文本系列-file命令用法》相關的同類信息!
  • 本頁收集關于一天一個shell命令 linux文本系列-file命令用法的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 男女一起嗟嗟嗟很痛原声| 安妮海瑟薇大尺度影片曝光| 飘雪影视在线观看免费观看新世界 | 双性花蒂抹药带环h| 亚洲gv猛男gv无码男同| tub8日本xxxx| 听说我喜欢你36集全免费观看| 多汁多肉调教的高h黄文| 国产精品久久久久久久久久久免费看| 国产女人18高潮毛片| 耽美双性h文| 国产罕见女同酒店磨豆腐AV在线| ?交12∽15在线播放| 制服丝袜中文第一页| 午夜色视频| 老师你下面太紧了拔不出来| 熟女人妻香蕉AV视频| 韩国xxxxx护士| 猛男gaygay免费网站| 久久亚洲w码s码| 国产欧美日韩精品夜色在线不卡| 91秒拍国产福利一区| 国产美女精品视频免费观看| 女董事长被戴项圈调教沉沦小说| 粉嫩被老汉添的好舒服A片小说| 国产精品人人妻人色五月| 嗯不要太深了| 深夜福利网| 五月激情视频| A级毛片全部免费第54集| 久久zyz| nt怎么看男女| 班主任解开内裤让我桶她| 午夜免费看一级AAA片| 日本裤袜xxxx视频| sese久久| **b视频| 国产老熟女高潮毛片A片仙踪林 | 扒开她的内裤| 亚洲综合sss久久天堂| 9191在线观看|