下面有一个目录/var/test1,内容如下:
.
..
.git
.gitignore
file1
file2
Run Code Online (Sandbox Code Playgroud)
并且我想将其复制到/var/test2具有预先存在内容的其他位置:
.
..
file1
Run Code Online (Sandbox Code Playgroud)
如果我使用 Ansible copy:
- copy:
# note the trailing `/` at `src: /var/test1/` in order to copy the contents
src: /var/test1/
dest: /var/test2
Run Code Online (Sandbox Code Playgroud)
它将取代 file1在/var/test2
如何在不替换目标文件的情况下复制目录内容?
| 归档时间: |
|
| 查看次数: |
20388 次 |
| 最近记录: |