linux 盘?linux系统哪个好用

大家好,关于linux 盘很多朋友都还不太明白,今天小编就来为大家分享关于linux系统哪个好用的知识,希望对各位有所帮助!

UNIX/ Linux文件系统中,一个盘块的大小为1KB,

:UNIX/Linux文件系统中,一个盘块的大小为1KB,每个盘块号占4个字节,即每块可放256个地址。直接寻址为10块,一次间接寻址为256块,二次间接寻址为256二次方块,三次间接寻址为256三次方块。

首先将逻辑文件的字节偏移量转换为文件的逻辑块号和块内偏移。方法是:将逻辑文件的字节偏移量/盘块大小,商为文件的逻辑块号,余数是块内偏移;再将文件的逻辑块号转换为物理块号,使用多重索引结构,在索引节点中根据逻辑块号通过直接索引或间接索引找到对应物理块号。

偏移为263168字节的逻辑块号是:263168/1024=257。块内偏移量=263168-257×1024=0。由于10<257<256+10,故263168字节在一次间接寻址内。

1KB= 1024B

同理可得 9999/1024=9.....783故选AA. i.addr[9]+ 783,第十块的783处

linux查看磁盘空间

linux怎么查看磁盘空间呢?下面就一起来看看吧!

linux查看磁盘空间

1、打开linux系统,在linux的桌面的空白处右击。

2、在弹出的下拉选项里,点击打开终端。

3、然后在终端窗口中使用命令df-h,输完按回车,就可以查看到服务器磁盘的使用率和空间大小了,这样控制窗口中就会显示如下图片上的信息。

linux磁盘分区方法

产品型号:Thinkpad E15

系统版本:centos8

案例:在sdb盘上建一个分区,大小为1G

在虚拟机上添加一块硬盘

例:对sdb这块盘划分一个100M的分区出来

[root@xuegod63~]# fdisk/dev/sdb

...

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删除分区

g create a new empty GPT partition table

G create an IRIX(SGI) partition table

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 partitions 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): p-----打印分区表

Command(m for help): n----新建一个分区

Partition type:

p primary(2 primary, 0 extended, 2 free) p:主分区

e extended e:扩展分区

Select(default p):--#直接默认

Using default response p

Partition number(1,4, default 1):---#直接默认

First sector(1230848-41943039, default 1230848):---#直接默认

Using default value 1230848

Last sector,+sectors or+size{K,M,G}(1230848-41943039, default 41943039):+1G

#输入分区大小

Partition 3 of type Linux and of size 1 GiB is set

Command(m for help): w#保存退出

格式化并创建文件系统

[root@xuegod63~]# mkfs.xfs/dev/sdb1

注:-f参数可以对已经存在文件系统的分区,强制格式化

[root@xuegod63~]# mkdir/sdb1#创建挂载点

[root@xuegod63~]# mount/dev/sdb1/sdb1/#挂载

[root@xuegod63~]# df-h#查看

阅读剩余
THE END