我想将一个文件夹的内容(而不是文件夹本身)复制到ubuntu中的另一个文件夹。有没有什么方法可以用cp命令来做呢?CP始终也会移动源文件夹
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
oldFolder
newFolder
cp -r ./oldFolder/* ./newFolder/
2, Copy only one file from the oldFolder to newFolder
cp -r ./oldFolder/file.txt ./newFolder/
1条答案
按热度按时间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 thenewFolder
cp -r ./oldFolder/* ./newFolder/
2, Copy only one file from the
oldFolder
tonewFolder
cp -r ./oldFolder/file.txt ./newFolder/