fdisk 磁盘分区命令
fdisk
fdisk磁盘分区命令
-v
打印 fdisk 的版本信息并退出.
-l
列出指定设备的分区表信息并退出。 如果没有给出设备,那么使用那些在 /proc/partitions (如果存在)提到的.
-u
以扇区数而不是以柱面数的形式显示分区表中各分区的信息. -s 分区 将分区的 大小 (单位为块)信息输出到标准输出
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
例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 磁盘分区命令的更多相关文章
- (转)centos7.4 fdisk磁盘分区 格式化 挂载
centos7.4 fdisk磁盘分区 格式化 挂载 原文:http://blog.csdn.net/capecape/article/details/78499351 1.查看系统中有多少可以识别的 ...
- Linux学习(十三)du、df、fdisk磁盘分区
一.du du命令是查看文件或者目录大小的命令. 一般使用du -sh 查看,不用-sh参数意义也不大,应为不用这个参数,它会把目录下的所有文件大小递归的显示出来,就像这样: 如果用-sh参数: [r ...
- [转]使用fdisk磁盘分区和 Linux 文件系统
概述 在本文中,学习磁盘分区和 Linux 文件系统相关内容.学习: 创建分区 使用 mkfs 命令来设置 ext2.ext3.ext4.xfs.Reiser v3 和 vfat 文件系统 创建和管理 ...
- fdisk磁盘分区与挂载
参考博客:https://blog.csdn.net/capecape/article/details/78499351?locationNum=6&fps=1 1.查看磁盘分区情况.root ...
- Linux-fdisk磁盘分区命令(16)
名称: fdisk 使用: fdisk [块设备磁盘] 说明: 将一个块设备(磁盘)分成若干个块设备(磁盘),并将分区的信息写进分区表. fdisk命令菜单常用参数如下所示: d:(del)删除一个 ...
- fdisk 磁盘分区
.[root@test4 ~]# fdisk /dev/sda //对sda磁盘进行分区 Device contains neither a valid DOS partition table, no ...
- fdisk磁盘分区
http://www.cr173.com/html/4336_1.html http://www.51cto.com/art/200602/20328.htm
- 【linux磁盘分区--格式化】fdisk,parted,mkfs.ext3
磁盘分区完成后,一般就需要对分区进行格式化 磁盘分区命令主要有两个: fdisk :最大支持不超过2T分区: parted :支持GPT,适用于大容量分区: 分区指令的选择: 在RHEL系统上,用fd ...
- 初始化Linux数据盘、磁盘分区、挂载磁盘(fdisk)
1.操作场景 2.前提条件 3.划分分区并挂载磁盘 4.设置开机自动挂载磁盘分区 1.操作场景 本文以云服务器的操作系统为"CentOS 7.4 64位"为例,采用fdisk分区工 ...
随机推荐
- JDBC_12_JDBC事务
JDBC事务 JDBC中事务默认自动提交,每执行一次SQL就会自动提交一次. 这样的话可能出现数据安全性问题. connection.setAutoCommit(false) false代表关闭自动提 ...
- openpyxl 库
1. 简介与安装 2.具体示例 2.1 获取workbook与sheet对象 2.2 访问单元格及其值 2.3 写数据 2.4 设置样式 1. 简介与安装 openpyxl 简介 openpyxl 是 ...
- istio之envoy常见术语及状态码
基本术语 Downstream(下游):下游主机连接到 Envoy,发送请求并接收响应,即发送请求的主机. Upstream(上游):上游主机接收来自 Envoy 的连接和请求,并返回响应,即接受请求 ...
- nginx+nginx-upsync-module实现配置动态更新
模块微博开源:https://github.com/weibocom/nginx-upsync-module#upsync 实现方案: nginx+consul nginx+etcd Installa ...
- 脱壳——UPX脱壳原理(脱壳helloworld)
脱壳--UPX脱壳原理 脱壳步骤 1 找到OEP 2 dump(导出)内存文件 3 修复 1 找到OEP 1 程序运行先从壳代码运行,壳代码执行完之后会跳转到真正的OEP,也就是是说第一步,首先要找到 ...
- C语言基础知识错误总结
1. 以下选项中能表示合法常量的是( ). Select one: a. '\' b. 1.5E2.0 c. "\007" d. 1,200 Feedback The corre ...
- 【死磕JVM】看完这篇我也会排查JVM内存过高了 就是玩儿!
前言 CPU 是时分的,操作系统里面有很多线程,每个线程的运行时间由CPU决定,CPU会分给每一个线程一个时间片,时间片是一个很短的时间长度,如果在时间片内,线程一直占有,就是100%,我们应该意识到 ...
- dalvik浅析三:类加载
android的安装包是个apk文件,其中包含dex.资源及签名文件.其中dex是包含程序运行的类代码,而android是运行在dalvik(5.0之前)上的.本篇我们就来看下dalvik是如何把de ...
- Xposed框架中XSharePreference的使用
本文博客地址:https://blog.csdn.net/QQ1084283172/article/details/81194406 在Xposed框架的模块编写中,通常希望我们自己写的Android ...
- POJ2406简单KMP
题意: 给一个字符串,求最大的前缀循环周期,就是最小的循环节对应的最大的那个周期. 思路: KMP的简单应用,求完next数组后有这样的应用:next[i] :是最大循环节的第几位 ...