精品丰满熟女一区二区三区_五月天亚洲欧美综合网_亚洲青青青在线观看_国产一区二区精选

  • <menu id="29e66"></menu>

    <bdo id="29e66"><mark id="29e66"><legend id="29e66"></legend></mark></bdo>

  • <pre id="29e66"><tt id="29e66"><rt id="29e66"></rt></tt></pre>

      <label id="29e66"></label><address id="29e66"><mark id="29e66"><strike id="29e66"></strike></mark></address>
      學習啦 > 學習電腦 > 操作系統(tǒng) > Linux教程 >

      linux中的file命令有哪幾種用法實例介紹

      時間: 加城1195 分享

        Linux中的file命令用于辨識文件的類型,不過具體用法有幾種,根據(jù)參數(shù)不同而不同,包括列出結果,顯示指令過程,顯示文件類別等,那么具體用法有哪些呢?下面由學習啦小編為大家整理了linux中的file命令的相關知識,希望對大家有幫助!

        linux中的file命令實例

        顯示文件類型:

        [root@localhost ~]# file install.log

        install.log: UTF-8 Unicode text

        [root@localhost ~]# file -b install.log <== 不顯示文件名稱

        UTF-8 Unicode text

        [root@localhost ~]# file -i install.log <== 顯示MIME類別。

        install.log: text/plain; charset=utf-8

        [root@localhost ~]# file -b -i install.log

        text/plain; charset=utf-8

        顯示符號鏈接的文件類型

        [root@localhost ~]# ls -l /var/mail

        lrwxrwxrwx 1 root root 10 08-13 00:11 /var/mail -> spool/mail

        [root@localhost ~]# file /var/mail

        /var/mail: symbolic link to `spool/mail'

        [root@localhost ~]# file -L /var/mail

        /var/mail: directory

        [root@localhost ~]# file /var/spool/mail

        /var/spool/mail: directory

        [root@localhost ~]# file -L /var/spool/mail

        /var/spool/mail: directory

        相關閱讀:Linux系統(tǒng)常見故障現(xiàn)象

        1. MBR中grub損壞,1_5階段的數(shù)據(jù)損壞,2階段的grub損壞

        2. initramfs*.img文件損壞,內核文件損壞

        3. /boot/grub/grub.conf文件丟失

        4. /etc/fstab丟失,無法掛載根等文件系統(tǒng)

        5. /boot 目錄全部的文件丟失

        6. root密碼忘記

        7. 為grub設置密碼,開機時生效,保護root密碼被惡意修改等

        二、常見故障的分析解決:

        1. 1階段和1_5階段出問題時會開機執(zhí)行完BIOS自檢后直接報錯

        2. 前面兩個階段順利通過,到了執(zhí)行/boot/ 下面的第二個階段時的程序調用/boot/grub/grub.conf 時文件丟失或者/boot/下內核文件和initramfs*.img 文件丟失都會造成卡在第二個階段:丟失initramfs文件時會在過了開機選擇內核啟動之后卡住不動,沒有任何提示(在/boot/grub /grub.conf 配置文件中定義了timeout時間,會過了倒計時,然后沒有任何提示)如果是丟失grub.conf 是會進入grub>提示符由管理員指定內核文件和initramfs文件位置

        3. /etc/fstab丟失:

        系統(tǒng)可以開機,但是開機時會卡好長時間,因為許多服務等待超時無法啟動,此時磁盤按照默認以只讀掛載根,這個掛載是在開機時掛載的,因為沒有fstab文件所以無法重新掛載根文件系統(tǒng)以及其他的系統(tǒng),沒有運行級別

        4. 為grub設置了密碼會在開機進入內核啟動時,想要修改grub和內核的參數(shù)或者進入系統(tǒng)時需要輸入密碼,當然忘記這樣的密碼也只能使用光盤引導進入救援模式修改配置文件/etc/grub/grub.conf 把相應的密碼行刪除即可

      3996225