Ubuntu将文件夹中的文件复制到新文件夹

lskq00tm  于 2022-10-05  发布在  其他
关注(0)|答案(1)|浏览(251)

我想将一个文件夹的内容(而不是文件夹本身)复制到ubuntu中的另一个文件夹。有没有什么方法可以用cp命令来做呢?CP始终也会移动源文件夹

qij5mzcb

qij5mzcb1#

To move contents of a folder to another in Linux systems the simplest way to do that is to use cp command.

1, Example of coping all contents that are in the oldFolder to the newFolder

cp -r ./oldFolder/* ./newFolder/

2, Copy only one file from the oldFolder to newFolder

cp -r ./oldFolder/file.txt ./newFolder/

相关问题