没有合适的资源?快使用搜索试试~ 我知道了~
linux系统下文件的归档、压缩和解压操作
资源推荐
资源详情
资源评论
6.4 上机实训
1.实训目的
1) 熟练掌握软件的查询、安装和卸载。
2) 熟练掌握文件的归档、压缩和解压操作。
2.实训内容
1)归档压缩操作
(1) 查询所用机器中安装的软件。
[root@localhost ~]#rpm -qa
(2) 检查机器中是否安装 ftp、telnet、samba 和 bind 等软件。
[root@localhost ~]# rpm -qa|grep vsftpd
[root@localhost ~]# rpm -qa|grep telnet
[root@localhost ~]# rpm -qa|grep samba
[root@localhost ~]# rpm -qa|grep bind
(3) 在/aaa 目录下创建 file1,file2 文件。
[root@localhost ~]# mkdir /aaa
[root@localhost aaa]# touch file1 file2
(4) 把文件 file1,file1 打包为 file.tar。
[root@localhost ~]# tar -cvf file.tar file1 file2
(5) 从打包文件 myfile.tar 中取出文件。
[root@localhost ~]# tar -xvf file.tar
(6) 创建 file3 并追加到名称为 file.tar 文件中。
[root@localhost ~]# touch file3
[root@localhost ~]# tar -rf file.tar file3
(7) 把 aaa 目录下的文件进行打包并压缩为 files.tar.gz。
[root@localhost ~]# tar -czvf file.tar.gz /aaa
(8) 把打包压缩文件解压到/test 中。
[root@localhost ~]# tar -xzvf file.tar.gz -C /test
2)配置本地数据源
(1) 配置本地数据源。
(2) 测试并验证 DNF 是否正在从本地仓库获取软件包。
[root@localhost ~]# dnf repolist
(3) 使用 dnf 安装 MySQL。
[root@localhost ~]# dnf -y install mysql
(4) 使用 dnf 列出指定软件包的安装情况。
[root@localhost ~]# dnf info mysql
(5) 使用 dnf 列出软件的信息。
[root@localhost ~]# dnf list mysql
(6) 使用 dnf 删除指定的软件包。
[root@localhost ~]# dnf remove mysql
2. 实训总结
通过本次实训,用户可以掌握 rpm、tar 和 dnf 软件包的管理,对 Linux 的后续内容的
资源评论
会的东西有点杂
- 粉丝: 742
- 资源: 230
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功