小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

linux - 文件系統(tǒng)(fdisk)

 木水刃 2010-08-26
至于如何在 Linux中進行硬盤分區(qū)操作,推薦使用 fdisk。其它工具比如parted 和cfdisk在某一方面有點優(yōu)點,但是對新手存在一定的風險。fdsik 能劃分磁盤成為若干個區(qū),同時也能為每個分區(qū)指定分區(qū)的文件系統(tǒng),比如linux 、fat32、 linux 、linux swap 、fat16 以及其實類Unix類操作系統(tǒng)的文件系統(tǒng)等;

一、合理規(guī)劃硬盤分區(qū)

1、硬盤分區(qū)劃分標準
硬盤的分區(qū)由主分區(qū)、擴展分區(qū)和邏輯分區(qū)組成;所以我們在對硬盤分區(qū)時要遵循這個標準;主分區(qū)(包括擴展分區(qū))的最大個數(shù)是四個,主分區(qū)(包含擴展 分區(qū))的個數(shù)硬盤的主引導記錄MBR(Master Boot Recorder)決定的,MBR存放啟動管理程序(GRUB,LILO,NTLOARDER等)和分區(qū)表記錄。其中擴展分區(qū)也算一個主分區(qū);擴展分區(qū)下 可以包含更多的邏輯分區(qū);所以主分區(qū)(包括擴展分區(qū))范圍是從1-4,邏輯分區(qū)是從5開始的;比如下面的例子:
   Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 7 HPFS/NTFS
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)
/dev/hda3 2806 9729 55617030 5 Extended
/dev/hda5 2806 3825 8193118+ 83 Linux
/dev/hda6 3826 5100 10241406 83 Linux
/dev/hda7 5101 5198 787153+ 82 Linux swap / Solaris
/dev/hda8 5199 6657 11719386 83 Linux
/dev/hda9 6658 7751 8787523+ 83 Linux
/dev/hda10 7752 9729 15888253+ 83 Linux

通過這個例子,我們可以看到主分區(qū)有3個,從 hda1-hda3 ,擴展分區(qū)由 hda5-hda10 ;此硬盤沒有主分區(qū)4,所以也沒有顯示主分區(qū)hda4 ;但邏輯分區(qū)不可能從4開始,因為那是主分區(qū)的位置;
IDE 硬盤在Linux或者其它類Unix系統(tǒng)的一般表示為 hd* ,比如hda、hdb ... ... ,我們可以通過 fdisk -l 來查看;有時您可能只有一個硬盤,在操作系統(tǒng)中看到的卻是 hdb ,這與硬盤的跳線有關;另外hdc 大多表示是光驅(qū)設備;如果您有兩塊硬盤,大多是 hda和hdb。
2、合理的規(guī)劃分區(qū);

關于一個磁盤的分區(qū),一個磁盤應該有四個主分區(qū),其中擴展也算一個主分區(qū);存在以下情況:

1)分區(qū)結(jié)構之一:四個主分區(qū),沒有擴展分區(qū);

[主|分區(qū)1] [主分|區(qū)2] [主|分區(qū)3] [主|分區(qū)4]

這種情況,如果您想在一個磁盤上劃分五個以上分區(qū),這樣是行不通的;


三個主分區(qū) 一個擴展分區(qū);


[ 主 |  分區(qū)1 ] [ 主 | 分區(qū)2 ] [ 主 | 分區(qū)3 ] [擴展分區(qū)]
|
[邏輯|分區(qū)5] [邏輯|分區(qū)6] [邏輯|分區(qū)7] [邏輯|分區(qū)8] ... ...

這種情況行得通,而且分區(qū)的自由度比較大;分區(qū)也不受約束,能分超過5個分區(qū);這只是舉一個例子;


2)最合理的的分區(qū)方式;

最合理的分區(qū)結(jié)構:主分區(qū)在前,擴展分區(qū)在后,然后在擴展分區(qū)中劃分邏輯分區(qū);主分區(qū)的個數(shù)+擴展分區(qū)個數(shù)要控制在四個之內(nèi);比如下面的分區(qū)是比較好的;

[主|分區(qū)1] [主|分區(qū)2] [主|分區(qū)3] [擴展分區(qū)]
|
[邏輯|分區(qū)5] [邏輯|分區(qū)6] [邏輯|分區(qū)7] [邏輯|分區(qū)8] ... ...

[主|分區(qū)1] [主|分區(qū)2] [擴展分區(qū)]
|
[邏輯|分區(qū)5] [邏輯|分區(qū)6] [邏輯|分區(qū)7] [邏輯|分區(qū)8] ... ...

[主|分區(qū)1] [擴展分區(qū)]
|
[邏輯|分區(qū)5] [邏輯|分區(qū)6] [邏輯|分區(qū)7] [邏輯|分區(qū)8] ... ...



最不合理的分區(qū)結(jié)構: 主分區(qū)包圍擴展分區(qū);比如下面的;

[主|分區(qū)1] [主|分區(qū)2] [擴展分區(qū)] [主|分區(qū)4] [空白未分區(qū)空間]
|
[邏輯|分區(qū)5] [邏輯|分區(qū)6] [邏輯|分區(qū)7] [邏輯|分區(qū)8] ... ...

這樣 [主|分區(qū)2][主|分區(qū)4] 之間的 [擴展分區(qū)] 是有自由度,但[主|分區(qū)4]后的[空白未分區(qū)空間]怎么辦?除非把主分區(qū)4完全利用擴展分區(qū)后的空間,否則您想在主分區(qū)4后再劃一個分區(qū)是不可能的,劃分邏輯分區(qū)更不可能; 雖然類似此種辦法也符合一個磁盤四個主分區(qū)的標準,但這樣主分區(qū)包圍擴展分區(qū)的分區(qū)方法實在不可??;

二、fdisk -l 查看硬盤及分區(qū)信息

1、通過fdisk -l 查看機器所掛硬盤個數(shù)及分區(qū)情況;

[root@localhost beinan]# fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 7 HPFS/NTFS
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)
/dev/hda3 2806 9729 55617030 5 Extended
/dev/hda5 2806 3825 8193118+ 83 Linux
/dev/hda6 3826 5100 10241406 83 Linux
/dev/hda7 5101 5198 787153+ 82 Linux swap / Solaris
/dev/hda8 5199 6657 11719386 83 Linux
/dev/hda9 6658 7751 8787523+ 83 Linux
/dev/hda10 7752 9729 15888253+ 83 Linux
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
/dev/sda6 51 76 200781 83 Linux
通過上面的信息,我們知道此機器中掛載兩個硬盤(或移動硬盤),其中一個是hda 另一個是sda ;如果我們想查看單個硬盤情況,可以通過 fdisk -l /dev/hda1 或者fdisk -l /dev/sda1 來操作;以fdisk -l 輸出的硬盤標識為準;
其中 hda有三個主分區(qū)(包括擴展分區(qū)),分別是主分區(qū) hda1 hda2 和hda3(擴展分區(qū)) ;邏輯分區(qū)是 hda5到hda10;
其中 sda 有兩個主分區(qū)(包括擴展分區(qū)),分別是 hda1 和hda2 (擴展分區(qū));邏輯分區(qū)是 sda5 hda6 ;
硬盤總?cè)萘?主分區(qū)(包括擴展分區(qū))總?cè)萘?br>擴展分區(qū)容量=邏輯分區(qū)總?cè)萘?br>通過上面的例子,我們可以得知 hda=hda1+hda2+hda3,其中hda3=hda5+hda6+hda7+hda8+hda9+hda10 ... ...

2、關于fdisk -l 一些數(shù)值的說明;

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

這個硬盤是80G的,有255個磁面;63個扇區(qū);9729個磁柱;每個 cylinder(磁柱)的容量是 8225280 bytes=8225.280 K(約為)=8.225280M(約為);
分區(qū)序列 引導 開始 終止 容量 分區(qū)類型ID 分區(qū)類型
Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 7 HPFS/NTFS
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)
/dev/hda3 2806 9729 55617030 5 Extended
/dev/hda5 2806 3825 8193118+ 83 Linux
/dev/hda6 3826 5100 10241406 83 Linux
/dev/hda7 5101 5198 787153+ 82 Linux swap / Solaris
/dev/hda8 5199 6657 11719386 83 Linux
/dev/hda9 6658 7751 8787523+ 83 Linux
/dev/hda10 7752 9729 15888253+ 83 Linux

說明:

硬盤分區(qū)的表示:在Linux 是通過hd*x 或 sd*x 表示的,其中 * 表示的是a、b、c ... ... x表示的數(shù)字 1、2、3 ... ... hd大多是IDE硬盤;sd大多是SCSI或移動存儲;
引導(Boot):表示引導分區(qū),在上面的例子中 hda1 是引導分區(qū);
Start (開始):表示的一個分區(qū)從X cylinder(磁柱)開始;
End (結(jié)束):表示一個分區(qū)到 Y cylinder(磁柱)結(jié)束;
id和System 表示的是一個意思,id看起來不太直觀,我們要在fdisk 一個分區(qū)時,通過指定id來確認分區(qū)類型;比如 7表示的就NTFS 分區(qū);這個在fdisk 中要通過t功能來指定。下面的部份會提到;
Blocks(容量):這是我翻譯的,其實不準確,表示的意思的確是容量的意思,其單位是K;一個分區(qū)容量的值是由下面的公式而來的;

Blocks = (相應分區(qū)End數(shù)值 - 相應分區(qū)Start數(shù)值)x 單位cylinder(磁柱)的容量

所以我們算一下 hda1的 Blocks 的大小 :

hda1 Blocks=(765-1)x8225.280=6284113.92 K = 6284.113.92M

3、估算一個存儲設備是否被完全劃分;

我們估算一個硬盤是否完全被劃分,我們只要看 fdisk -l 輸出的內(nèi)容中的 cylinders(柱體) 上一個分區(qū)的End 和 下一個分區(qū)的Start是不是一個連續(xù)的數(shù)字,另外要看一下每個硬盤設備的fdisk -l 的開頭部份,看一下他的 cylinders(柱體)的值;

比如hda設備,我們看到的是 9729 cylinders ;我們通過 hda的分區(qū)表可以看到上一個分區(qū)的End的值+1 就是下一個分區(qū)的Start 的值;比如 hda2的Start的值是 hda1 的End 的值+1,這證明 hda1 和hda2 中間沒有空白分區(qū),是連續(xù)的,以此類推;在 hda10,我們看到 End 的值是9729 ,而在fdisk -l頭部信息中也有9729 cylinders,證明這個硬盤已經(jīng)完全劃分;

Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
/dev/sda6 51 76 200781 83 Linux

我們再看看 sda 移動儲是不是被完全劃分了;sda有 125個cylinders (柱體),有一個主分區(qū)和一個擴展分區(qū)構成;在擴展分區(qū)中,我們看到End的值為125,而這個移動硬盤的cylinder也是125,這能說明這個硬盤 不可能再添加任何主分區(qū)了;根據(jù)我們上面所說的 sda1 sda2 sda5 sda6 之間未有任何未劃分空間,但sda6 的cylinders (柱體)的End值卻是 76 ,而 sda總的cylinders (柱體)有125個,由此看來sda 在 sda6后面有未劃分區(qū)域;

至于sda 有多少未劃分空間,我們算一下就知道了;擴展分區(qū)總?cè)萘渴?806400 K ,大約是 806.400M左右,而邏輯分區(qū) sda5 和sda6 的大小加起來是 400M左右,所以還仍有400M左右未劃分空間,并且只能劃分為鏈邏輯分區(qū);

三、fdisk 對硬盤及分區(qū)的操作,進入fdisk 對硬盤操作階段

fdisk 操作硬盤的命令格式如下:
[root@localhost beinan]# fdisk 設備

比如我們通過 fdisk -l 得知 /dev/hda 或者 /dev/sda設備;我們?nèi)绻朐偬砑踊蛘邉h除一些分區(qū),可以用

[root@localhost beinan]# fdisk /dev/hda

[root@localhost beinan]# fdisk /dev/sda

在以后的例子中,我們要以 /dev/sda設備為例,來講解如何用fdisk 來操作添加、刪除分區(qū)等動作;
1、fdisk 的說明

當我們通過 fdisk 設備,進入相應設備的操作時,會發(fā)現(xiàn)有如下的提示;以 fdisk /dev/sda 設備為例,以下同;

[root@localhost beinan]# fdisk /dev/sda
Command (m for help): 在這里按m ,就會輸出幫助;
Command action
   a toggle a bootable flag
   b edit bsd disklabel
   c toggle the dos compatibility flag
   d delete a partition 注:這是刪除一個分區(qū)的動作;
   l list known partition types 注:l是列出分區(qū)類型,以供我們設置相應分區(qū)的類型;
   m print this menu 注:m 是列出幫助信息;
   n add a new partition 注:添加一個分區(qū);
   o create a new empty DOS partition table
   p print the partition table 注:p列出分區(qū)表;
   q quit without saving changes 注:不保存退出;
   s create a new empty Sun disklabel
   t change a partition's system id 注:t 改變分區(qū)類型;
   u change display/entry units
   v verify the partition table
   w write table to disk and exit 注:把分區(qū)表寫入硬盤并退出;
   x extra functionality (experts only) 注:擴展應用,專家功能;

其實我們常用的只有注有中文的,其它的功能我們不常用(呵,主要是我不會用,否則早會賣弄一下了);x擴展功能,也不是常用的;一般的情況下只要懂得 d l m p q t w 就行了;

下面以實例操作來詳述,沒有例子沒有辦法就,新手也看不懂;
2、列出當前操作硬盤的分區(qū)情況,用p

Command (m for help): p
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
/dev/sda6 51 76 200781 83 Linux
3、通過fdisk的d指令來刪除一個分區(qū)
Command (m for help): p 注:列出分區(qū)情況;
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
/dev/sda6 51 76 200781 83 Linux
Command (m for help): d 注:執(zhí)行刪除分區(qū)指定;
Partition number (1-6): 6 注:我想刪除 sda6 ,就在這里輸入 6 ;
Command (m for help): p 注:再查看一下硬盤分區(qū)情況,看是否刪除了?
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
Command (m for help):

警告:刪除分區(qū)時要小心,請看好分區(qū)的序號,如果您刪除了擴展分區(qū),擴展分區(qū)之下的邏輯分區(qū)都會刪除;所以操作時一定要小心;如果知道自己操作錯了,請不要驚慌,用q不保存退出;切記切記?。。?!在分區(qū)操作錯了之時,千萬不要輸入w保存退出?。?!
4、通過fdisk的n指令增加一個分區(qū)

Command (m for help): p
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
Command (m for help): n 注:增加一個分區(qū);
Command action
   l logical (5 or over) 注:增加邏輯分區(qū),分區(qū)編號要大于5;為什么要大于5,因為已經(jīng)有sda5了;
   p primary partition (1-4) 注:增加一個主分區(qū);編號從 1-4 ;但sda1 和sda2都被占用,所以只能從3開始;
p
Partition number (1-4): 3
No free sectors available 注:失敗中,為什么失敗?

注:我試圖增加一個主分區(qū),看來是失敗了,為什么失?。恳驗槲覀兛吹街鞣謪^(qū)+擴展分區(qū)把整個磁盤都用光了,看擴展分區(qū)的End的值,再看一下 p輸出信息中有125 cylinders;最好還是看前面部份;那里有提到;

所以我們只能增加邏輯分區(qū)了;

 Command (m for help): n
Command action
   l logical (5 or over)
   p primary partition (1-4)
l 注:在這里輸入l,就進入劃分邏輯分區(qū)階段了;
First cylinder (51-125, default 51): 注:這個就是分區(qū)的Start 值;這里最好直接按回車,如果您輸入了一個非默認的數(shù)字,會造成空間浪費;
Using default value 51
Last cylinder or +size or +sizeM or +sizeK (51-125, default 125): +200M 注:這個是定義分區(qū)大小的,+200M 就是大小為200M ;當然您也可以根據(jù)p提示的單位cylinder的大小來算,然后來指定 End的數(shù)值?;仡^看看是怎么算的;還是用+200M這個辦法來添加,這樣能直觀一點。如果您想添加一個10G左右大小的分區(qū),請輸入 +10000M ;
Command (m for help):
5、通過fdisk的t指令指定分區(qū)類型
Command (m for help): t 注:通過t來指定分區(qū)類型;
Partition number (1-6): 6 注:要改變哪個分區(qū)類型呢?我指定了6,其實也就是sda6
Hex code (type L to list codes):L 注:在這里輸入L,就可以查看分區(qū)類型的id了;
Hex code (type L to list codes): b 注:如果我想讓這個分區(qū)是 W95 FAT32 類型的,通過L查看得知 b是表示的是,所以輸入了b;
Changed system type of partition 6 to b (W95 FAT32) 注:系統(tǒng)信息,改變成功;是否是改變了,請用p查看;
Command (m for help): p
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
/dev/sda6 51 75 201568+ b W95 FAT32
6、fdisk 的退出,用q或者 w
其中 q是 不保存退出,w是保存退出;
Command (m for help): w

Command (m for help): q
7、一個添加分區(qū)的例子
本例中我們會添加兩個200M的主分區(qū),其它為擴展分區(qū),在擴展分區(qū)中我們添加兩個200M大小的邏輯分區(qū);
Command (m for help): p 注:列出分區(qū)表;
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
   Device Boot Start End Blocks Id System
Command (m for help): n 注:添加分區(qū);
Command action
   e extended
   p primary partition (1-4)
p 注:添加主分區(qū);
Partition number (1-4): 1 注:添加主分區(qū)1;
First cylinder (1-125, default 1): 注:直接回車,主分區(qū)1的起始位置;默認為1,默認就好;
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-125, default 125): +200M 注:指定分區(qū)大小,用+200M來指定大小為200M
Command (m for help): n 注:添加新分區(qū);
Command action
   e extended
   p primary partition (1-4)
p 注:添加主分區(qū)
Partition number (1-4): 2 注:添加主分區(qū)2;
First cylinder (26-125, default 26):
Using default value 26
Last cylinder or +size or +sizeM or +sizeK (26-125, default 125): +200M 注:指定分區(qū)大小,用+200M來指定大小為200M
Command (m for help): n
Command action
   e extended
   p primary partition (1-4)
e 注:添加擴展分區(qū);
Partition number (1-4): 3 注:指定為3 ,因為主分區(qū)已經(jīng)分了兩個了,這個也算主分區(qū),從3開始;
First cylinder (51-125, default 51): 注:直接回車;
Using default value 51
Last cylinder or +size or +sizeM or +sizeK (51-125, default 125): 注:直接回車,把其余的所有空間都給擴展分區(qū);
Using default value 125
Command (m for help): p
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ 83 Linux
/dev/sda2 26 50 201600 83 Linux
/dev/sda3 51 125 604800 5 Extended
Command (m for help): n
Command action
   l logical (5 or over)
   p primary partition (1-4)
l 注:添加邏輯分區(qū);
First cylinder (51-125, default 51):
Using default value 51
Last cylinder or +size or +sizeM or +sizeK (51-125, default 125): +200M 注:添加一個大小為200M大小的分區(qū);
Command (m for help): n
Command action
   l logical (5 or over)
   p primary partition (1-4)
l 注:添加一個邏輯分區(qū);
First cylinder (76-125, default 76):
Using default value 76
Last cylinder or +size or +sizeM or +sizeK (76-125, default 125): +200M 注:添加一個大小為200M大小的分區(qū);
Command (m for help): p 列出分區(qū)表;
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
   Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ 83 Linux
/dev/sda2 26 50 201600 83 Linux
/dev/sda3 51 125 604800 5 Extended
/dev/sda5 51 75 201568+ 83 Linux
/dev/sda6 76 100 201568+ 83 Linux

然后我們根據(jù)前面所說通過t指令來改變分區(qū)類型;

最后不要忘記w保存退出;
五、對分區(qū)進行格式化,以及加載

先提示一下;用 mkfs.bfs mkfs.ext2 mkfs.jfs mkfs.msdos mkfs.vfatmkfs.cramfs mkfs.ext3 mkfs.minix mkfs.reiserfs mkfs.xfs 等命令來格式化分區(qū),比如我想格式化 sda6為ext3文件系統(tǒng),則輸入;

[root@localhost beinan]# mkfs.ext3 /dev/sda6

如果我想加載 sda6到目前系統(tǒng)來存取文件,應該有mount 命令,但首先您得建一個掛載目錄;比如 /mnt/sda6 ;

[root@localhost beinan]# mkdir /mnt/sda6
[root@localhost beinan]# mount /dev/sda6 /mnt/sda6
[root@localhost beinan]# df -lh
Filesystem 容量 已用 可用 已用% 掛載點
/dev/hda8 11G 8.4G 2.0G 81% /
/dev/shm 236M 0 236M 0% /dev/shm
/dev/hda10 16G 6.9G 8.3G 46% /mnt/hda10
/dev/sda6 191M 5.6M 176M 4% /mnt/sda6

這樣我們就能進入 /mnt/sda6目錄,然后存取文件了;

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多