[英]Bash Copy folder content, not folder
I would like to copy the contents of a folder to another one, without copying the actual folder itself. 我想将一个文件夹的内容复制到另一个文件夹,而不复制实际的文件夹本身。 For example, in /dirA/dirB/ I have a.txt, b.txt and c.txt.
例如,在/ dirA / dirB /中,我有a.txt,b.txt和c.txt。 I would like to do:
我想要做:
cp -r /dirA/dirB/ /some/folder/
In a way that a.txt, b.txt and c.txt are in /some/folder, not in /some/folder/dirB 以某种方式a.txt,b.txt和c.txt位于/ some / folder中,而不位于/ some / folder / dirB中
cp /dirA/dirB/*.txt /some/folder
将这样做,避免使用-r
选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.