人妖在线一区,国产日韩欧美一区二区综合在线,国产啪精品视频网站免费,欧美内射深插日本少妇

新聞動(dòng)態(tài)

Linux中df命令查詢(xún)磁盤(pán)信息和fdisk命令分區(qū)的用法

發(fā)布日期:2022-01-29 15:23 | 文章來(lái)源:gibhub

df - 報(bào)告文件系統(tǒng)磁盤(pán)空間的使用情況

總覽

df [OPTION]... [FILE]... POSIX 選項(xiàng): [-kP]

GNU 選項(xiàng) (最短方式): [-ahHiklmPv] [-t fstype] [-x fstype] [--block-size=size] [--print-type] [--no-sync] [--sync] [--help] [--version] [--]

描述

此手冊(cè)頁(yè)文檔是df的GNU版本. df命令列出指定的每一個(gè)文件名所在的文件系統(tǒng)上可用磁盤(pán)空間的數(shù)量。 如果沒(méi)有指定文件名,則顯示當(dāng)前所有使用中的文件系統(tǒng).缺省設(shè)置時(shí), 磁盤(pán)空間以1K為一塊顯示,如果環(huán)境變量POSIXLY_CORRECT已設(shè) 置,則采用512字節(jié)為一塊顯示. 如果參數(shù)是一個(gè)包含已使用文件系統(tǒng)的磁盤(pán)設(shè)備名, df命令顯示出的是該文件系統(tǒng)的可用空間,而非包含設(shè)備結(jié)點(diǎn)的文件系 統(tǒng)(只能是根文件系統(tǒng)).此版本的df不能顯示未使用文件系統(tǒng)的可用空 間,這是由于大多數(shù)系統(tǒng)在響應(yīng)這樣的請(qǐng)求時(shí)必須很清楚該文件系統(tǒng)的 結(jié)構(gòu).

GNU 參數(shù)說(shuō)明

-a, --all
列出包括BLOCK為0的文件系統(tǒng)
--block-size=SIZE use SIZE-byte blocks
指定塊的大小
-h,--huma-readable
用常見(jiàn)的格式顯示出大小(例如:1K 234M 2G)
-H,--si
同上,但是這里的1k等于1000字節(jié)而不是1024字節(jié)
-i, --inodes
用信息索引點(diǎn)代替塊表示使用狀況
-k, --kilobytes
指定塊大小等于1024字節(jié)來(lái)顯示使用狀況
-l, --local
只顯示本地文件系統(tǒng)使用狀況
-m, --megabytes
以指定塊大小等于1048576字節(jié)(1M)來(lái)顯示使用狀況
--no-sync
在取得使用信息前禁止調(diào)用同步 (default)
-P, --portability
使用POSIX格式輸出
--sync
在取得使用信息前調(diào)用同步
-t, --type=TYPE
只顯示指定類(lèi)型(TYPE)的文件系統(tǒng)
-T, --print-type
輸出每個(gè)文件系統(tǒng)的類(lèi)型
-x, --exclude-type=TYPE
只顯示指定類(lèi)型(TYPE)之外的文件系統(tǒng).
-v (忽略)
--help
輸出該命令的幫助信息并退出
--version
輸出版本信息并退出

例:


復(fù)制代碼
代碼如下:

[root@localhost ~]# df #列出各文件系統(tǒng)的磁盤(pán)空間使用情況
[root@localhost ~]# df -ia #列出各文件系統(tǒng)的i節(jié)點(diǎn)使用情況
[root@localhost ~]# df -T #列出文件系統(tǒng)的類(lèi)型
[root@localhost ~]# df -h #目前磁盤(pán)空間和使用情況 以更易讀的方式顯示
[root@localhost ~]# df -k #以單位顯示磁盤(pán)的使用情況



fdisk磁盤(pán)分區(qū)命令

-v
打印 fdisk 的版本信息并退出.
-l
列出指定設(shè)備的分區(qū)表信息并退出。 如果沒(méi)有給出設(shè)備,那么使用那些在 /proc/partitions (如果存在)提到的.
-u
以扇區(qū)數(shù)而不是以柱面數(shù)的形式顯示分區(qū)表中各分區(qū)的信息. -s 分區(qū) 將分區(qū)的 大小 (單位為塊)信息輸出到標(biāo)準(zhǔn)輸出

例a,查看所有分區(qū)

復(fù)制代碼
代碼如下:

[root@localhost ~]# fdisk -l</p> <p>Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes</p> <p>Device BootStartEndBlocksId System
/dev/sda1* 1 1713655283 Linux
/dev/sda2 18279 210451582 Linux swap / Solaris
/dev/sda3 280 60801486142965 5 Extended
/dev/sda5 280 60801486142964+ 83 Linux

例b,fdisk分區(qū)

復(fù)制代碼
代碼如下:

[root@localhost ~]# fdisk /dev/hdc #分區(qū)時(shí),不要加上數(shù)字
The number of cylinders for this disk is set to 5005.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): m #可以查看幫助
Command action
atoggle a bootable flag
bedit bsd disklabel
ctoggle the dos compatibility flag
ddelete a partition #刪除分區(qū)
llist known partition types#列舉已知分區(qū)
mprint this menu
nadd a new partition #增加分區(qū)
ocreate a new empty DOS partition table
pprint the partition table #顯示分區(qū)表
qquit without saving changes #不保存退出分區(qū)
screate a new empty Sun disklabel
tchange a partition's system id #改變分區(qū)ID
uchange display/entry units
vverify the partition table
wwrite table to disk and exit #保存分區(qū)操作
xextra functionality (experts only)

Command (m for help): p
Disk /dev/hdc: 41.1 GB, 41174138880 bytes #磁盤(pán)名稱(chēng)和大小
255 heads, 63 sectors/track, 5005 cylinders#磁頭、磁區(qū)與磁柱數(shù)量,多少
Units = cylinders of 16065 * 512 = 8225280 bytes #每個(gè)磁柱的大小
Device BootStartEndBlocksId System
/dev/hdc1* 1 1310439183 Linux
/dev/hdc2 14 1288 10241437+ 83 Linux
/dev/hdc31289 1925 5116702+ 83 Linux
/dev/hdc41926 5005 24740100 5 Extended
/dev/hdc51926 2052 102009682 Linux swap / Solaris
Command (m for help): q# q是不保存退出,w不要隨便輸入

例c,-c 以柱面顯示

復(fù)制代碼
代碼如下:

[root@server7 ~]# fdisk -cl /dev/vdb
Disk /dev/vdb: 8589 MB, 8589934592 bytes
16 heads, 63 sectors/track, 16644 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xce720981
Device BootStartEndBlocksId System
/dev/vdb1320610240083 Linux
/dev/vdb2 20640910240083 Linux
/dev/vdb3 40961210240083 Linux
[root@server7 ~]# fdisk -ul /dev/vdb
Disk /dev/vdb: 8589 MB, 8589934592 bytes
16 heads, 63 sectors/track, 16644 cylinders, total 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xce720981
Device BootStartEndBlocksId System
/dev/vdb1204820684710240083 Linux
Partition 1 does not end on cylinder boundary.
/dev/vdb2 20684841164710240083 Linux
Partition 2 does not end on cylinder boundary.
/dev/vdb3 41164861644710240083 Linux
Partition 3 does not end on cylinder boundary.

國(guó)外服務(wù)器租用

版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。

相關(guān)文章

實(shí)時(shí)開(kāi)通

自選配置、實(shí)時(shí)開(kāi)通

免備案

全球線(xiàn)路精選!

全天候客戶(hù)服務(wù)

7x24全年不間斷在線(xiàn)

專(zhuān)屬顧問(wèn)服務(wù)

1對(duì)1客戶(hù)咨詢(xún)顧問(wèn)

在線(xiàn)
客服

在線(xiàn)客服:7*24小時(shí)在線(xiàn)

客服
熱線(xiàn)

400-630-3752
7*24小時(shí)客服服務(wù)熱線(xiàn)

關(guān)注
微信

關(guān)注官方微信
頂部