1.首先建立一个目录,一会儿放压缩包,此时目录里没有任何文件
[root@server1 test]# pwd
/opt/test
[root@server1 test]# ls
[root@server1 test]#
2.打包
3.运行之后
/usr/local/bin/python3 /root/PycharmProjects/NSD211/day8/taryunyong.py
Process finished with exit code 0
4.此时查看目录下就出现了我们打好的包
[root@server1 test]# ls
bee.tar.gz
5.解包
6.运行之后
/usr/local/bin/python3 /root/PycharmProjects/NSD211/day8/taryunyong.py
Process finished with exit code 0
7.解包完成
[root@server1 test]# ls
bee.tar.gz etc
[root@server1 test]# tree etc
etc
├── passwd
└── security
├── access.conf
├── chroot.conf
├── console.apps
│ ├── config-util
│ ├── liveinst
│ ├── rhn_register
│ └── subscription-manager
├── console.handlers
├── console.perms
├── console.perms.d
├── faillock.conf
├── group.conf
├── limits.conf
├── limits.d
├── namespace.conf
├── namespace.d
├── namespace.init
├── opasswd
├── pam_env.conf
├── pwquality.conf
├── pwquality.conf.d
├── sepermit.conf
└── time.conf
6 directories, 19 files
[root@server1 test]#