linux初学 unit14
来源:互联网 发布:穿越还珠之美女知画 编辑:程序博客网 时间:2024/06/03 21:50
linux中设备的访问
1.设备访问
1.设备识别
/dev/xdxn ##硬盘设备/dev/sda1
/dev/cdrom ##光驱
2.设备的使用
《设备的发现》
fdisk -l ##查看真实存在的设备
cat /proc/partitions ##系统能够识别的设备
blkid ##系统能够挂载使用的设备id
《设备的使用》
1.设备的挂载
mount 设备 挂载点
mount /dev/sdb1 /mnt #把系统中第二块硬盘的第一个分区挂载到/mnt目录上
2.卸载设备
umout 设备|挂载点
如出现以下情况:
[root@foundation0 ~]# umount /dev/sdb1
umount: /home/kiosk/Desktop/photo: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
解决:
2.软硬链接
ls -i ##查看文件节点号
ln -s /file /file1 ##软链接
3.文件查找
1.locate filename ##在文件数据库中搜索filename信息,updatedb更新文件数据库
2.find
find 查找位置 -条件 条件值 -exec 动作 {} \;
-name
-not 条件
-user
-group
-size
-perm
--maxdepth
--mindepth
-a
-o
-type f 文件
d 目录
c 字符设备
b 块设备
s 套节字
l 链接
find /mnt -user student
find /mnt -group linux
find /mnt -user student -a -group linux
find /mnt -user student -o -group linux
find /mnt -user student -a -group linux
find /mnt -user student
dd if=/dev/zero of=/mnt/file1 bs=1024 count=10
dd if=/dev/zero of=/mnt/file2 bs=1024 count=20
dd if=/dev/zero of=/mnt/file3 bs=1024 count=30
find /mnt -size 10k
find /mnt -size -10k
1.设备访问
1.设备识别
/dev/xdxn ##硬盘设备/dev/sda1
/dev/cdrom ##光驱
/dev/mapper/* ##虚拟设备
2.设备的使用
《设备的发现》
fdisk -l ##查看真实存在的设备
cat /proc/partitions ##系统能够识别的设备
blkid ##系统能够挂载使用的设备id
df ##查看设备被系统使用的情况
《设备的使用》
1.设备的挂载
mount 设备 挂载点
mount /dev/sdb1 /mnt #把系统中第二块硬盘的第一个分区挂载到/mnt目录上
2.卸载设备
umout 设备|挂载点
如出现以下情况:
[root@foundation0 ~]# umount /dev/sdb1
umount: /home/kiosk/Desktop/photo: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
解决:
fuser -kvm 设备|挂载点 -k kill ,-v显示详细信息,-m扫描设备
2.软硬链接
ls -i ##查看文件节点号
ln -s /file /file1 ##软链接
ln /file /file1 ##硬链接
3.文件查找
1.locate filename ##在文件数据库中搜索filename信息,updatedb更新文件数据库
2.find
find 查找位置 -条件 条件值 -exec 动作 {} \;
-name
-not 条件
-user
-group
-size
-perm
--maxdepth
--mindepth
-a
-o
-type f 文件
d 目录
c 字符设备
b 块设备
s 套节字
l 链接
find /mnt -user student
find /mnt -group linux
find /mnt -user student -a -group linux
find /mnt -user student -o -group linux
find /mnt -user student -a -group linux
find /mnt -user student
find /mnt -user student -a -not -group linux
dd if=/dev/zero of=/mnt/file1 bs=1024 count=10
dd if=/dev/zero of=/mnt/file2 bs=1024 count=20
dd if=/dev/zero of=/mnt/file3 bs=1024 count=30
find /mnt -size 10k
find /mnt -size -10k
find /mnt -size +10k
0 0
- linux初学 unit14
- unit14
- unit14
- Unit14
- Linux学习篇之~unit14
- RHEL7--UNIT14-linux设备访问
- linux基础unit14-设备的使用
- unit14 linux中设备的访问
- unit14 linux中设备的访问
- Linux基础学习——unit14
- Linux Unit14--虚拟机的自动安装脚本
- Unit14 文档
- 初学linux
- 初学Linux
- linux初学
- 初学linux
- Linux初学
- linux 初学
- volatile失效,慎重使用volatile关键字
- 2017/4/18计划
- git tag — 标签相关操作
- C#中的Attribute详解(下)
- volley出现的获取数据异常
- linux初学 unit14
- JQuery实战总结一 可编辑的表格
- “双飞燕”页面布局
- 摄像头camera初始化失败,导致双向视频时本地视频和远端视频黑屏oppo上
- Yii2 后台添加《操作日志》的功能
- jQuery获取动态创建元素的内容
- Linux如何查看CPU温度
- iptables
- 购物商城---开发流程--获取品牌列表