python distutils

python distutils,第1张

[root@master python]# ll /root/
total 942164
-rw-------. 1 root root      1260 Jul 21  2021 anaconda-ks.cfg
-rw-r--r--  1 root root       250 Feb 18 16:50 busybox.yaml
-rw-------  1 root root 911093248 Feb 17 11:23 centos-qcow2.tar.gz
-rw-r--r--  1 root root       152 Feb 15 17:53 Dockerfile
-rw-r--r--  1 root root      1234 Feb 18 15:01 io
-rw-r--r--  1 root root     13278 Feb 18 15:02 iotop
-rw-r--r--  1 root root      4566 Feb  8 13:59 k8s-flannel.yaml
-rw-r--r--  1 root root      3896 Feb  8 11:08 k8s-set.sh
-rw-r--r--  1 root root       211 Feb  8 14:51 kubevirt-cr.yaml
-rw-r--r--  1 root root     95774 Feb 15 15:20 kubevirt-operator.yaml
drwxr-xr-x  3 root root        17 Mar  2 18:14 systemd-private-4771fe5c586d4fcfaa98ea71ff9257a9-chronyd.service-cN8fuw
-rw-r--r--  1 root root       433 Feb 17 10:57 virt-centos-qcow2.yaml
-rw-r--r--  1 root root  53520954 Dec  8 14:51 virtctl-v0.41.0-linux-amd64
-rw-r--r--  1 root root       166 Feb 17 15:14 vmi-svc.yaml
-rw-r--r--  1 root root       541 Feb 17 15:14 vm-virt-centos-qcow2.yaml
[root@master python]# ll /tmp/
total 0
drwx------ 3 root root 17 Feb 15 15:11 systemd-private-4771fe5c586d4fcfaa98ea71ff9257a9-chronyd.service-cN8fuw
[root@master python]# cat distutilstest.py 
import distutils
from distutils import dir_util
from distutils import file_util

dir_util.copy_tree(src='/root/',dst='/tmp')
[root@master python]# python3 distutilstest.py 
[root@master python]# ll /tmp/
total 942164
-rw------- 1 root root      1260 Jul 21  2021 anaconda-ks.cfg
-rw-r--r-- 1 root root       250 Feb 18 16:50 busybox.yaml
-rw------- 1 root root 911093248 Feb 17 11:23 centos-qcow2.tar.gz
-rw-r--r-- 1 root root       152 Feb 15 17:53 Dockerfile
-rw-r--r-- 1 root root      1234 Feb 18 15:01 io
-rw-r--r-- 1 root root     13278 Feb 18 15:02 iotop
-rw-r--r-- 1 root root      4566 Feb  8 13:59 k8s-flannel.yaml
-rw-r--r-- 1 root root      3896 Feb  8 11:08 k8s-set.sh
-rw-r--r-- 1 root root       211 Feb  8 14:51 kubevirt-cr.yaml
-rw-r--r-- 1 root root     95774 Feb 15 15:20 kubevirt-operator.yaml
drwx------ 3 root root        17 Feb 15 15:11 systemd-private-4771fe5c586d4fcfaa98ea71ff9257a9-chronyd.service-cN8fuw
-rw-r--r-- 1 root root       433 Feb 17 10:57 virt-centos-qcow2.yaml
-rw-r--r-- 1 root root  53520954 Dec  8 14:51 virtctl-v0.41.0-linux-amd64
-rw-r--r-- 1 root root       166 Feb 17 15:14 vmi-svc.yaml
-rw-r--r-- 1 root root       541 Feb 17 15:14 vm-virt-centos-qcow2.yaml

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/789146.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-05
下一篇 2022-05-05

发表评论

登录后才能评论

评论列表(0条)

保存