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. Windows搭建Linux子系统(WSL)详细教程

    介绍 WSL(windows下的Linux子系统) Windows Subsystem for Linux(简称WSL)是一个在Windows 10上能够运行原生Linux二进制可执行文件(ELF格式 ...

  2. 【笔记】《算法竞赛入门》习题7-3 UVa211_多米诺效应

    title: 习题7-3 UVa211_多米诺效应 date: 2021-01-29 19:08:00 categories: 算法竞赛入门 tags: 数据结构 算法 UVa 题目: 使用28个多米 ...

  3. LAMP架构上线动态网站WordPress

    第一步,一键安装LAMP架构所需要的程序 yum install -y httpd mariadb-server php php-mysql 第二步,配置httpd,修改主配置文件/etc/httpd ...

  4. 面试有关TCP常问的几个问题

    在面试中网络问题是一定会考察的,而TCP协议则是考察网络知识的重点.经常会被问道的问题如下: 请讲一下TCP协议建立连接的过程 请介绍TCP协议中的三次握手和四次挥手是怎么样的 为什么TCP协议要三次 ...

  5. vue 进阶学习(一): vue 框架说明和与其他框架的对比

    vue 框架说明和与其他框架的对比 一.说明 是一套用于构建用户界面的渐进式框架.与其它大型框架不同的是,Vue 被设计为可以自底向上逐层应用.Vue 的核心库只关注视图层,不仅易于上手,还便于与第三 ...

  6. Java封装接口统一返回数据模板

    现在大多数都使用前后端分离开发模式,前端通过Ajax请求访问后台服务器,后台返回JSON数据供前端操作,这里编写一个统一返回数据模板类,方便日后操作 public class R extends Ha ...

  7. 8.switch语句

    switch语句语法 switch(expression){ case value : //语句 break; //可选 case value : //语句 break; //可选 //你可以有任意数 ...

  8. AppScan扫描器的用法

    目录 AppScan 软件功能 建立一次基础的扫描 AppScan AppScan是一款非常好用且功能强大的Web 应用安全测试工具,曾以 Watchfire AppScan 的名称享誉业界,AppS ...

  9. 2020腾讯Android岗初级到高级面试真题收录解析

    前言 马上就要到金九银十面试季了,需要找工作的小伙伴可以开始刷题复习了. 今天给大家分享的是博主腾讯面试的面经以及对腾讯2020上半年Android开发岗面经真题收录,希望可以帮助到大家,喜欢的朋友可 ...

  10. PhpStorm个性化设置推荐

    预览 字体 字体使用jetbrains的mono,前往下载:如何安装,字体安装完成之后Restart,可在PhpStorm settings中搜索 font 进行启用 mono 字体 主题 主题推荐使 ...