如何将带有文件的文件夹复制到Unix/Linux中的另一个文件夹? [英] How do I copy folder with files to another folder in Unix/Linux?
本文介绍了如何将带有文件的文件夹复制到Unix/Linux中的另一个文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在将包含该文件夹中文件的文件夹复制到另一个文件夹时遇到一些问题.命令cp -r
不会复制文件夹中的文件.
I am having some issues to copy a folder with files in that folder into another folder. Command cp -r
doesn't copy files in the folder.
推荐答案
您要查找的选项是-R
.
cp -R path_to_source path_to_destination/
- 如果
destination
不存在,则会创建它. -
-R
表示copy directories recursively
.您还可以使用-r
,因为它不区分大小写. - 根据@ muni764的
- If
destination
doesn't exist, it will be created. -R
meanscopy directories recursively
. You can also use-r
since it's case-insensitive.- Note the nuances with adding the trailing
/
as per @muni764's comment.
这篇关于如何将带有文件的文件夹复制到Unix/Linux中的另一个文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- If
查看全文