分析Linux磁盘管理与文件系统专题
来源:互联网 发布:电子文件加密软件 编辑:程序博客网 时间:2024/05/16 15:58
1
2
3
4
5
[root@localhost dev]
# mknod mydev c 66 0
[root@localhost dev]
# mknod -m 640 mydev2 c 66 1
[root@localhost dev]
# ls -l mydev*
crw-r--r-- 1 root root 66, 0 Jun 22 21:27 mydev
crw-r----- 1 root root 66, 1 Jun 22 21:28 mydev2
1
2
3
4
5
6
7
[root@localhost dev]
# tty
/dev/pts/0
[root@localhost dev]
# who
root pts
/0
2014-06-22 20:22 (192.168.204.1)
zhangfengzhe pts
/1
2014-06-22 21:36 (192.168.204.1)
[root@localhost dev]
# echo "hello , zhangfengzhe " >> /dev/pts/1
[root@localhost dev]
#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[root@localhost ~]
# fdisk -l
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 6 48163+ 83 Linux
/dev/sda2
7 515 4088542+ 83 Linux
/dev/sda3
516 2356 14787832+ 83 Linux
/dev/sda4
2357 2610 2040255 5 Extended
/dev/sda5
2357 2610 2040223+ 82 Linux swap / Solaris
Disk
/dev/sdb
: 1073 MB, 1073741824 bytes
255 heads, 63 sectors
/track
, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk
/dev/sdb
doesn't contain a valid partition table
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[root@localhost ~]
# fdisk /dev/sdb
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.
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)
1
2
3
4
5
6
7
8
Command (m
for
help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-130, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-130, default 130): +50M
1
2
3
4
5
6
Command (m
for
help): p
Disk
/dev/sdb
: 1073 MB, 1073741824 bytes
255 heads, 63 sectors
/track
, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1
1 7 56196 83 Linux
1
2
3
4
5
6
7
8
9
Command (m
for
help): p
Disk
/dev/sdb
: 1073 MB, 1073741824 bytes
255 heads, 63 sectors
/track
, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1
1 7 56196 83 Linux
/dev/sdb2
8 15 64260 83 Linux
/dev/sdb3
16 25 80325 83 Linux
/dev/sdb4
26 130 843412+ 5 Extended
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Command (m
for
help): d
Partition number (1-4): 4
Command (m
for
help): p
Disk
/dev/sdb
: 1073 MB, 1073741824 bytes
255 heads, 63 sectors
/track
, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1
1 7 56196 83 Linux
/dev/sdb2
8 15 64260 83 Linux
/dev/sdb3
16 25 80325 83 Linux
Command (m
for
help): n
Command action
e extended
p primary partition (1-4)
e
Selected partition 4
First cylinder (26-130, default 26):
Using default value 26
Last cylinder or +size or +sizeM or +sizeK (26-130, default 130):
Using default value 130
Command (m
for
help): p
Disk
/dev/sdb
: 1073 MB, 1073741824 bytes
255 heads, 63 sectors
/track
, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1
1 7 56196 83 Linux
/dev/sdb2
8 15 64260 83 Linux
/dev/sdb3
16 25 80325 83 Linux
/dev/sdb4
26 130 843412+ 5 Extended
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Command (m
for
help): n
First cylinder (26-130, default 26):
Using default value 26
Last cylinder or +size or +sizeM or +sizeK (26-130, default 130): +50M
Command (m
for
help): p
Disk
/dev/sdb
: 1073 MB, 1073741824 bytes
255 heads, 63 sectors
/track
, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1
1 7 56196 83 Linux
/dev/sdb2
8 15 64260 83 Linux
/dev/sdb3
16 25 80325 83 Linux
/dev/sdb4
26 130 843412+ 5 Extended
/dev/sdb5
26 32 56196 83 Linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[root@localhost ~]
# fdisk -l
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 6 48163+ 83 Linux
/dev/sda2
7 515 4088542+ 83 Linux
/dev/sda3
516 2356 14787832+ 83 Linux
/dev/sda4
2357 2610 2040255 5 Extended
/dev/sda5
2357 2610 2040223+ 82 Linux swap / Solaris
Disk
/dev/sdb
: 1073 MB, 1073741824 bytes
255 heads, 63 sectors
/track
, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1
1 7 56196 83 Linux
/dev/sdb2
8 15 64260 83 Linux
/dev/sdb3
16 25 80325 83 Linux
/dev/sdb4
26 130 843412+ 5 Extended
/dev/sdb5
26 32 56196 82 Linux swap / Solaris
0 0
- 分析Linux磁盘管理与文件系统专题
- linux磁盘与文件系统管理
- Linux 磁盘与文件系统管理
- Linux 磁盘与文件系统管理
- Linux 磁盘与文件系统管理
- Linux磁盘与文件系统管理
- Linux磁盘与文件系统管理
- Linux磁盘与文件系统管理
- Linux磁盘与文件系统管理
- Linux磁盘与文件系统管理
- linux---磁盘与文件系统管理
- Linux磁盘与文件系统管理
- linux 磁盘管理与文件系统
- Linux磁盘与文件系统管理
- Linux磁盘与文件系统管理
- Linux磁盘与文件系统管理
- Linux磁盘与文件系统管理
- 【鸟哥Linux】Linux 磁盘与文件系统管理
- 利用js制作html table分页示例(js实现分页)
- Unity3d NGUI的使用(十一)(UITable制作下拉文字显示)
- 三大WEB服务器对比分析(apache ,lighttpd,nginx)
- vb编程分别编写5个函数与过程:求和,求阶乘,求绝对值,求质数判断,求3个数的最大数
- 关于程序间通信的两点应用
- 分析Linux磁盘管理与文件系统专题
- php 实例说明 socket通信机制
- 备忘:UIButton 的图片和标题 向左对齐
- ofbiz功能介绍
- Unity3d NGUI的使用(十二)(UIGrid动态列表显示)
- UVA-12083-Guardian of Decency
- markdown在ubuntu上的使用
- LeetCode:Interleaving String
- Ubuntu——显示详细开机信息