单元练习
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了单元练习相关的知识,希望对你有一定的参考价值。
<<<第十二单元练习>>>
1.在server主机中把/etc目录打包压缩到/mnt中,名字为etc.tar.gz
[[email protected] /]# tar zcf /mnt/etc.tar.gz etc
[[email protected] /]# ll /mnt
total 8540
-rw-r--r--. 1 root root 8742561 Oct 10 07:32 etc.tar.gz
2.复制server主机中的etc.tar.gz到desktop主机的/mnt中
[[email protected] /]# cp /mnt/etc.tar.gz [email protected]:/mnt
cp: cannot create regular file ‘[email protected]:/mnt’: No such file or directory
[[email protected] /]# scp /mnt/etc.tar.gz [email protected]:/mnt
[email protected]‘s password:
etc.tar.gz 100% 8538KB 8.3MB/s 00:00
3.同步server主机中的/etc中的所有文件到desktop主机中/mnt中,包含链接文件
[[email protected] /]# cd /root/Desktop
[[email protected] Desktop]# rsync -lr /etc [email protected]:/mnt
[email protected]‘s password:
[[email protected] Desktop]# ll /mnt
total 8540
-rw-r--r--. 1 root root 8742561 Oct 10 07:32 etc.tar.gz
[[email protected] Desktop]# ll /mnt
total 8568
drwxr-xr-x. 133 root root 8192 Oct 10 07:40 etc
-rw-r--r--. 1 root root 8742561 Oct 10 07:36 etc.tar.gz
-rw-rw-r--. 1 student student 1690 Oct 10 00:57 file.all
-rw-rw-r--. 1 student student 815 Oct 10 00:55 find.err
-rw-rw-r--. 1 student student 30 Oct 10 00:54 find.out
-rw-rw-r--. 1 student student 30 Oct 10 01:04 find.out.1
<<<第十一单元练习>>>
1.在系统中创建set-ip-tool命令要求如下
当在系统中执行set-ip-tool 172.25.254.X 后
*)会自动显示ifconfig命令的输出
*)系统ip被设定为:172.25.254.X
*)系统网关被设定为:172.25.254.250
*)系统dns被设定为:172.25.254.250
[[email protected] Desktop]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.25.254.99 netmask 255.255.255.0 broadcast 172.25.254.255
inet6 fe80::5054:ff:fe00:310a prefixlen 64 scopeid 0x20<link>
ether 52:54:00:00:31:0a txqueuelen 1000 (Ethernet)
RX packets 9039 bytes 39051255 (37.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4424 bytes 337552 (329.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 1846 bytes 159460 (155.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1846 bytes 159460 (155.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
本文出自 “12106768” 博客,请务必保留此出处http://12116768.blog.51cto.com/12106768/1860379
以上是关于单元练习的主要内容,如果未能解决你的问题,请参考以下文章