31-10-2010

BASH Copying multiple files using the cp command

The man pages for the cp command don't tell you how you can copy multiple files and directories in one command. It's actually quite simple:

cp -R path-to-directory1 path-to-file path-to-directoryX destination-directory

Comments:

2 comments.
Your comment:

»
toto 14/05/2011, 5:02 pm
-R for recursive
Noob Saibot 06/08/2011, 11:57 am
I'm looking for an example of copying an array of files with a single cp command?

 

[x]