假设我有一个遵循以下结构的文件夹:
$ ls /tmp/level1
level2_folder1 level2_folder2
$ ls /tmp/level1/level2_folder1
input output script.py ...
$ ls /tmp/level1/level2_folder2
input output script.py ...
我只想将所有Python 脚本复制到其他地方,但保留现有结构。假设我想将 level1 文件夹复制到 home/ 所以它应该如下所示:
$ ls /home/level1
level2_folder1 level2_folder2
$ ls /home/level1/level2_folder1
script.py
$ ls /home/level1/level2_folder2
script.py
我怎么能那样做?