-
fdisk
2016-07-01 10:27:49fdisk
fdisk
[Mo@localhost /]$ fdisk -l
[Mo@localhost /]$ fdisk -l
为什么普通用户输入fdisk -l 命令后,没有任何的反应,没有任何的提示,
(提示权限不够等信息)不是输出磁盘的使用情况。当我切换到root用户的时候,又能够输出磁盘的使用情况:
[root@localhost ~]# fdisk -l
Disk /dev/sda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c88df
Device Boot Start End Blocks Id System
/dev/sda1 * 1 39 307200 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 39 2350 18566144 83 Linux
/dev/sda3 2350 2611 2097152 82 Linux swap / Solaris
总结:fdisk命令需要管理员的权限才能执行,在有些命令中,需要root
权限才能够执行。
问题:
1:(默认的情况下)有那些命令是需要root权限的?
2:怎样做,才能使普通用户可以执行某些命令?比如说:
限制Mo用户使用vi命令
3:为什么普通用户执行fdisk命令,没有任何提示,我记得
在Linux中,命令执行成功才没有提示,执行失败有错误的信息提示. -
fdisk
2009-09-28 15:47:00fdiskfdisk [device_name] 列出指定设备的分区表,如省略device_name,则列出所有设备的分区表信息1.查看当前分区情况[root@localhost ~]# fdisk -l Disk /dev/hda: 21.4 GB, 21474836480 bytes15 heads, 63 ...fdisk
fdisk [device_name] 列出指定设备的分区表,如省略device_name,则列出所有设备的分区表信息
1.查看当前分区情况
[root@localhost ~]# fdisk -l
Disk /dev/hda: 21.4 GB, 21474836480 bytes
15 heads, 63 sectors/track, 44384 cylinders
Units = cylinders of 945 * 512 = 483840 bytes
Disk /dev/hda doesn't contain a valid partition table
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+ 8e Linux LVM
2.为/dev/had分区
[root@localhost ~]# fdisk /dev/hda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 44384.
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)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
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
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): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-44384, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-44384, default 44384): 22192
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 2
First cylinder (22193-44384, default 22193): 22193
Last cylinder or +size or +sizeM or +sizeK (22193-44384, default 44384): 44384
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
3.查看分区后的情况
[root@localhost ~]# fdisk -l
Disk /dev/hda: 21.4 GB, 21474836480 bytes
15 heads, 63 sectors/track, 44384 cylinders
Units = cylinders of 945 * 512 = 483840 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 22192 10485688+ 83 Linux
/dev/hda2 22193 44384 10485720 5 Extended
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2610 20860402+ 8e Linux LVM
-
fdisk98img
2019-04-12 18:47:34fdisk98img,可以自行下载dosbox挂载fdisk98img,非常适合复古windows98时分区 -
linux fdisk
2014-12-17 23:16:12redhat linux 下如何使用 fdisk 的详细说明,很好的技术参考文档。 -
fdisk命令
2020-02-18 21:15:15fdisk -l 查询硬盘 fdisk一般用来对硬盘分区 分区: fdisk /dev/sdb 下面的命令知道dlmntwpq就行 在分好后,最后执行系统强制性重新读取分区信息:partprobe 格式化分区:mkfs -t ext4 /dev/sdb1 创建挂载...-
fdisk -l 查询硬盘
fdisk一般用来对硬盘分区 -
分区: fdisk /dev/sdb
下面的命令知道dlmntwpq就行
-
在分好后,最后执行系统强制性重新读取分区信息:partprobe
-
格式化分区:mkfs -t ext4 /dev/sdb1
-
创建挂载点:mkdir /disk1
-
挂载:mount /dev/sdb1 /disk1
-
分区的自动挂载:修改。 /etc/fstab 文件
-
/etc/fstab的修复,这个方法只能修复这个文件的错误:mount -o remount,rw/
-
-
fdisk分区工具合辑共5款fdisk分区工具
2019-08-07 11:01:16fdisk分区工具应该早期接触电脑的人都知道,他是一款在dos命令行下面使用的分区工具。 今天下午没事做,把网上所有的fdisk版本找出来分享给大家 分别如下: MSDOS6.22 MSDOS7.10 WinME 牛云飞汉化版 无忧启动汉化版 -
fdisk 源码包fdisk 源码包 fdisk源码包
2009-05-14 11:31:51提供linux下完整的fdisk功能,下载编译 install即可! -
linux命令fdisk
2020-10-15 21:53:32linux命令fdisk用进行磁盘分区 -b 指定每个分区的大小 -l 列出指定的外围设备的分区表状况 -s 将指定的分区大小输出到标准输出上,单位为区块linux命令fdisk用进行磁盘分区
-b 指定每个分区的大小
-l 列出指定的外围设备的分区表状况
-s 将指定的分区大小输出到标准输出上,单位为区块
-
fdisk分区
2020-06-08 22:33:191)fdisk命令分区过程 出现错误使用: 扩展分区不能格式化,在扩展分区里面分配逻辑分区 2)分区自动挂载与fstab文件修复 -
fdisk 使用
2018-11-15 10:21:02(1) fdisk -l 看下主要已经有的(主分区+扩展分区,逻辑区),扩展分区=各逻辑区之合。 1,2,3,4是主分区与扩展分区;五之后 为逻辑分区。扩展分区必须通过逻辑分区使用。主分区可以直接使用 (2)mkfs.xfs ...
-
NavMeshComponents-2018.2.zip
-
OPC UA 最新规范文档
-
大数据时代也要保护隐私
-
(新)备战2021软考网络工程师历年真题培训套餐
-
Bilateral_Filtering_Theory_and_Applications.pdf
-
11-autoinstall漏洞补丁_V7.1SP1_无月度修复包.zip
-
web前端HTML页面,web+css+js
-
Parallels Desktop 16 联网失败和不能连接USB设备解决方法
-
Spring动态数据源
-
gmssl.tar.gz
-
KlipC回顾2020年黄金ETF持仓量创历史新高,2021年是否会再创新高?
-
【数据分析-随到随学】Tableau数据分 析+PowerBI
-
第四章 选择结构(二)
-
2021-01-18
-
【数据分析-随到随学】机器学习模型及应用
-
oa管理系统项目源码、视频、sql
-
【数据分析-随到随学】Python语法强化与数据处理
-
『互联网架构』软件架构-软件环境的持续发布管理(下)
-
2021全网最详细【WEB前端】从零入门实战教程,全课程119节
-
pyechart数据可视化