Tag: Linux

  • 輕松解決Linux系統grub錯誤

    Linux在現在已經很強大了,導致Linux系統越來越受到電腦用戶的歡迎,於是很多人開始學習Linux時,學習時妳可能會遇到Linux系統grub常見錯誤問題,這裏將介紹Linux系統grub常見錯誤問題的解決方法,讓大家了解壹下。   1:Filenamemustbeeitheranabsolutefilenameorblocklist   解釋:1號錯誤表示文件名格式錯誤。在GRUB中要麽是以絕對路徑給出文件   例子:   grub>kernelvmlinuzroot=label=/   Error1:Filenamemustbeeitheranabsolutepathnameorblocklist   grub>   2:Badfileordirectorytype   解釋:2號錯誤表示命令期望的是壹個普通文件,但相應文件名的對象是壹個符號鏈接、目錄、FIFO   例子:   grub>kernel/testdirroot=LABEL=/   Error2:Badfileordirectorytype   grub>   3:Badorcorruptdatawhiledecompressingfile   解釋:3號錯誤表示解壓文件時發生錯誤。可能是因為這個文件被損壞了   4:Badorincompatibleheaderincompressedfile   解釋:4號錯誤表示壓縮文件的頭部格式不被兼容或者錯誤   5:Partitiontableinvalidorcorrupt   解釋:5號錯誤表示分區表無效或者被破壞。這是壹個不好的預兆   6:Mismatchedorcorruptversionofstage1/stage2   解釋:6號錯誤表示install命令發現stage1和stage2的頒布號不被兼容   7:Loadingbelow1MBisnotsupported   解釋:Thiserrorisreturnedifthelowestaddressinakernelisbelow   the1MBboundary.TheLinuxzImageformatisaspecialcaseand   canbehandledsinceithasafixedloadingaddressandmaximumsize   8:Kernelmustbeloadedbeforebooting   解釋:8號錯誤表示執行boot命令之前沒有先執行kernel命令   9:Unknownbootfailure   解釋:9號錯誤表示未知的引導錯誤   10:UnsupportedMultibootfeaturesrequested   解釋:10號錯誤表示請求Multibootheader所要求功能不被GRUB所支持。   11:Unrecognizeddevicestring   解釋:11號錯誤表示無法識別的設備字符串。   例子:   grub>roothd0   Error11:Unrecognizeddevicestring   grub>   12:Invaliddevicerequested   解釋:12號錯誤表示請求的設備無效   例子:   grub>root(hd2)   Error21:Selecteddiskdoesnotexist   grub>kernel/grub/grub.confroot=LABEL=/   Error12:Invaliddevicerequested   grub>   13:Invalidorunsupportedexecutableformat   解釋:13號錯誤表示無效或者無法識別的可執行格式   例子:   grub>kernel/grub/grub.confroot=LABEL=/   Error13:Invalidorunsupportedexecutableformat   grub>   14:Filesystemcompatibilityerror,cannotreadwholefile   解釋:14號錯誤表示文件系統兼容性錯誤,無法讀取整個文件   15:Filenotfound   解釋:請求的文件無法找到…

  • 詳細分析Linux du命令的使用

    Linux du命令也是查看使用空間的,但是與df命令不同的是Linux du命令是對文件和目錄磁盤使用的空間的查看,還是和df命令有壹些區別的,這裏介紹Linux du命令。   du:查詢檔案或目錄的磁盤使用空間   a:顯示全部目錄和其次目錄下的每個檔案所占的磁盤空間   b:大小用bytes來表示 (默認值為k bytes)   c:最後再加上總計 (默認值)   s:只顯示各檔案大小的總合   x:只計算同屬同壹個檔案系統的檔案   L:計算所有的檔案大小   常用命令:du –a   操作詳解   引用   指令 du 能以指定的目錄下的子目錄為單位,顯示每個目錄內所有檔案所占用的磁盤空間大小。例如:   # du -h /etc   104K /etc/defaults   6.0K /etc/X11   8.0K /etc/bluetooth   4.0K /etc/gnats   52K /etc/isdn   388K /etc/mail   68K /etc/mtree   2.0K /etc/ntp   38K /etc/pam.d   44K /etc/periodic/daily   6.0K /etc/periodic/monthly   42K /etc/periodic/security   16K /etc/periodic/weekly   110K /etc/periodic   6.0K /etc/ppp…

  • Linux學習-Iterator叠代得到list中的值

    Iterator叠代可以得到list中的數值。   Iterator  iterator  =  list.iterator() ;   While( iterator.hasNext()){   String XX=(String)iterator.next();   }   註意在while循環中壹定要有iterator.next();且只能出現壹次,必須有是因為只有.next()才能得到下壹條數據,否則進入死循環,只能有壹次是因為,出現壹次得到嚇壹跳記錄,如果同時出現兩次,則是在以此循環中得到了兩個數據。