fdisk

fdisk磁盘分区命令

-v
    打印 fdisk 的版本信息并退出.
-l
    列出指定设备的分区表信息并退出。 如果没有给出设备,那么使用那些在 /proc/partitions (如果存在)提到的.
-u
    以扇区数而不是以柱面数的形式显示分区表中各分区的信息. -s 分区 将分区的 大小 (单位为块)信息输出到标准输出

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

例1

例a,查看所有分区

[root@localhost ~]# fdisk -l      

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes 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不要随便输入

--------------------------------------------------------------------

开源是一种精神,分享是 一种美德。

fdisk 磁盘分区命令的更多相关文章

  1. (转)centos7.4 fdisk磁盘分区 格式化 挂载

    centos7.4 fdisk磁盘分区 格式化 挂载 原文:http://blog.csdn.net/capecape/article/details/78499351 1.查看系统中有多少可以识别的 ...

  2. Linux学习(十三)du、df、fdisk磁盘分区

    一.du du命令是查看文件或者目录大小的命令. 一般使用du -sh 查看,不用-sh参数意义也不大,应为不用这个参数,它会把目录下的所有文件大小递归的显示出来,就像这样: 如果用-sh参数: [r ...

  3. [转]使用fdisk磁盘分区和 Linux 文件系统

    概述 在本文中,学习磁盘分区和 Linux 文件系统相关内容.学习: 创建分区 使用 mkfs 命令来设置 ext2.ext3.ext4.xfs.Reiser v3 和 vfat 文件系统 创建和管理 ...

  4. fdisk磁盘分区与挂载

    参考博客:https://blog.csdn.net/capecape/article/details/78499351?locationNum=6&fps=1 1.查看磁盘分区情况.root ...

  5. Linux-fdisk磁盘分区命令(16)

    名称: fdisk 使用: fdisk [块设备磁盘] 说明: 将一个块设备(磁盘)分成若干个块设备(磁盘),并将分区的信息写进分区表.  fdisk命令菜单常用参数如下所示: d:(del)删除一个 ...

  6. fdisk 磁盘分区

    .[root@test4 ~]# fdisk /dev/sda //对sda磁盘进行分区 Device contains neither a valid DOS partition table, no ...

  7. fdisk磁盘分区

    http://www.cr173.com/html/4336_1.html http://www.51cto.com/art/200602/20328.htm

  8. 【linux磁盘分区--格式化】fdisk,parted,mkfs.ext3

    磁盘分区完成后,一般就需要对分区进行格式化 磁盘分区命令主要有两个: fdisk :最大支持不超过2T分区: parted :支持GPT,适用于大容量分区: 分区指令的选择: 在RHEL系统上,用fd ...

  9. 初始化Linux数据盘、磁盘分区、挂载磁盘(fdisk)

    1.操作场景 2.前提条件 3.划分分区并挂载磁盘 4.设置开机自动挂载磁盘分区 1.操作场景 本文以云服务器的操作系统为"CentOS 7.4 64位"为例,采用fdisk分区工 ...

随机推荐

  1. Java刷题-tree

    一.分别按照二叉树先序,中序和后序打印所有的节点. 这道题就是书上的算法思想的实际使用,唯一需要特别注意到的是用递归的方式建树,还是比较巧妙的,因为一棵树的建立过程字符流是重复使用的,用递归的方式对根 ...

  2. Spring Boot 2.4 新特性,全新的Cron表达式处理机制

    说起 cron 表达式大家一定不陌生,我们常用来作为定时任务执行策略规则. 在 Spring Boot 框架中 cron 表达式主要配合 @Scheduled 注解在应用程序中使用. 在 Spring ...

  3. 死磕Spring之AOP篇 - Spring AOP自动代理(二)筛选合适的通知器

    该系列文章是本人在学习 Spring 的过程中总结下来的,里面涉及到相关源码,可能对读者不太友好,请结合我的源码注释 Spring 源码分析 GitHub 地址 进行阅读. Spring 版本:5.1 ...

  4. linux 在某个路径下,查找某个文件

    find /cephfs/netdisk/ -name "*.sql"

  5. gateway调用Fegin失败问题解决

    起因 新项目用的是springcloud2.0,网关用gateway替换了zuul. gateway动态路由跟zuul有本质上的区别.这就涉及到webflux这一套大东东了.简单来说,gateway是 ...

  6. 基于MATLAB的手写公式识别(2)

    基于MATLAB的手写公式识别 图像的预处理(除去噪声.得到后续定位分割所需的信息.) 预处理其本质就是去除不需要的噪声信息,得到后续定位分割所需要的图像信息.图像信息在采集的过程中由于天气环境的影响 ...

  7. 06- Linux Ubuntu下sublime下载与使用与安装包

    我有Linux下全套的安装包,如sublime,pycharm等.不用再苦逼的下软件了.需要的加我微信:chimu sublime text 3文本编辑器 启动命令:Linux命令行输入subl 或者 ...

  8. hdu1529 差分约束(好题)

    题意:       超市在每个时间都有需要的人数(24小时)比如 1 0 0 0 0 ....也就是说在第0个小时的时候要用一个人,其他的时间都不用人,在给你一些人工作的起始时间,如果雇佣了这个人,那 ...

  9. Windows API初练手 -- 疯狂写文件代码

    警告:恶作剧软件,慎用!仅供初学者研究代码所用!!! 提示:默认文件创建目录在"D:\test",如果需要使用的话请自行更改目录. 1. Windows API 版本 (调用系统函 ...

  10. POJ2155二维线段树

    题意:      给一个n*n的01矩阵,然后有两种操作(m次)C x1 y1 x2 y2是把这个小矩形内所有数字异或一遍,Q x y 是询问当前这个点的值是多少?n<=1000 m<=5 ...