麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 系統 > Linux > 正文

Linux中df命令查詢磁盤信息和fdisk命令分區的用法

2019-10-26 16:12:40
字體:
來源:轉載
供稿:網友
Linux中df命令查詢磁盤信息和fdisk命令分區的用法

df - 報告文件系統磁盤空間的使用情況

總覽

df [OPTION]... [FILE]... POSIX 選項: [-kP]

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

描述

此手冊頁文檔是df的GNU版本. df命令列出指定的每一個文件名所在的文件系統上可用磁盤空間的數量。 如果沒有指定文件名,則顯示當前所有使用中的文件系統.缺省設置時, 磁盤空間以1K為一塊顯示,如果環境變量POSIXLY_CORRECT已設 置,則采用512字節為一塊顯示. 如果參數是一個包含已使用文件系統的磁盤設備名, df命令顯示出的是該文件系統的可用空間,而非包含設備結點的文件系 統(只能是根文件系統).此版本的df不能顯示未使用文件系統的可用空 間,這是由于大多數系統在響應這樣的請求時必須很清楚該文件系統的 結構.

GNU 參數說明

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

例:


復制代碼代碼如下:
[root@localhost ~]# df #列出各文件系統的磁盤空間使用情況
[root@localhost ~]# df -ia #列出各文件系統的i節點使用情況
[root@localhost ~]# df -T #列出文件系統的類型
[root@localhost ~]# df -h #目前磁盤空間和使用情況 以更易讀的方式顯示
[root@localhost ~]# df -k #以單位顯示磁盤的使用情況



fdisk磁盤分區命令

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

例a,查看所有分區

復制代碼代碼如下:
[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 Boot Start End Blocks Id System
/dev/sda1 * 1 17 136552 83 Linux
/dev/sda2 18 279 2104515 82 Linux swap / Solaris
/dev/sda3 280 60801 486142965 5 Extended
/dev/sda5 280 60801 486142964+ 83 Linux

例b,fdisk分區

復制代碼代碼如下:
[root@localhost ~]# fdisk /dev/hdc #分區時,不要加上數字
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
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition #刪除分區
l list known partition types #列舉已知分區
m print this menu
n add a new partition #增加分區
o create a new empty DOS partition table
p print the partition table #顯示分區表
q quit without saving changes #不保存退出分區
s create a new empty Sun disklabel
t change a partition's system id #改變分區ID
u change display/entry units
v verify the partition table
w write table to disk and exit #保存分區操作
x extra functionality (experts only)

Command (m for help): p
Disk /dev/hdc: 41.1 GB, 41174138880 bytes #磁盤名稱和大小
255 heads, 63 sectors/track, 5005 cylinders #磁頭、磁區與磁柱數量,多少
Units = cylinders of 16065 * 512 = 8225280 bytes #每個磁柱的大小
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 13 104391 83 Linux
/dev/hdc2 14 1288 10241437+ 83 Linux
/dev/hdc3 1289 1925 5116702+ 83 Linux
/dev/hdc4 1926 5005 24740100 5 Extended
/dev/hdc5 1926 2052 1020096 82 Linux swap / Solaris
Command (m for help): q # q是不保存退出,w不要隨便輸入

例c,-c 以柱面顯示

復制代碼代碼如下:
[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 Boot Start End Blocks Id System
/dev/vdb1 3 206 102400 83 Linux
/dev/vdb2 206 409 102400 83 Linux
/dev/vdb3 409 612 102400 83 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 Boot Start End Blocks Id System
/dev/vdb1 2048 206847 102400 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/vdb2 206848 411647 102400 83 Linux
Partition 2 does not end on cylinder boundary.
/dev/vdb3 411648 616447 102400 83 Linux
Partition 3 does not end on cylinder boundary.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 成人在线视频免费看 | 欧美在线成人影院 | 激情亚洲一区二区三区 | 92精品国产自产在线 | 国产中出在线观看 | 欧美一级电影网 | 国产一区二区三区视频观看 | 国产在线1区| 日本高清视频网站www | 亚洲成人精品一区二区 | 欧美日本中文字幕 | 欧美日本色 | 日本黄色一级毛片 | 欧美日韩中文字幕在线视频 | 亚洲午夜精品视频 | 国产精品av久久久久久久久久 | 日韩在线播放第一页 | 国产高潮好爽受不了了夜色 | 中国大陆高清aⅴ毛片 | 欧美黄色片一级 | 亚洲二区免费 | 国产亚洲在 | 亚洲成人精品在线 | 小视频成人| 色七七网站 | 国产成人强伦免费视频网站 | a集毛片| 天天草天天干天天射 | 亚洲爱爱图 | 91成人免费网站 | 精品亚洲网站 | 午夜视频国产 | 欧美一级黑人 | 九九久久视频 | 人人做人人看 | 亚洲第一页综合 | 天堂亚洲一区 | 免费观看视频在线观看 | 国产超碰人人爽人人做人人爱 | 日本一道aⅴ不卡免费播放 视屏一区 | 久久久久北条麻妃免费看 |