显示现已挂载的文件系统,挂装和卸载文件系统

[root@FQDN ~]# df –h    //显示已挂载的文件系统:df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   17G  3.8G   14G  23% /
devtmpfs                 473M     0  473M   0% /dev
tmpfs                    489M     0  489M   0% /dev/shm
tmpfs                    489M  7.3M  481M   2% /run
tmpfs                    489M     0  489M   0% /sys/fs/cgroup
/dev/sda1               1014M  199M  816M  20% /boot
tmpfs                     98M  4.0K   98M   1% /run/user/42
tmpfs                     98M   20K   98M   1% /run/user/1000
/dev/sr0                 4.3G  4.3G     0 100% /run/media/heshuilong/CentOS 7 x86_64
tmpfs                     98M     0   98M   0% /run/user/0
[root@FQDN ~]# mkdir /he 
[root@FQDN ~]# mount -t ext4 /dev/sdb5  /he
mount: wrong fs type, bad option, bad superblock on /dev/sdb5,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so.
[root@FQDN ~]# mkfs.ext4 /dev/sdb5  //创建ext4的文件系统:mkdir +<文件>
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux	
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
327680 inodes, 1310720 blocks
65536 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1342177280
40 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736
Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done 
[root@FQDN ~]# mount -t ext4 /dev/sdb5  /he  //挂载文件系统:mount –t+<文件系统>+<设备名>+ <挂载点>
[root@FQDN ~]# df -h /he
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb5       4.8G   20M  4.6G   1% /he
[root@FQDN ~]# du /he  //显示指定文件的文件系统du (-h)+<文件名>
16	/he/lost+found
20	/he
[root@FQDN ~]# du -h /he
16K	/he/lost+found
20K	/he
[root@FQDN ~]# umount /he //卸载文件系统:umount+<文件名>
[root@FQDN ~]# du -h /he
0	/he

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值