I have a several large files on optical media I would like to copy to multiple targets - in this case I have two hard drives attached to the same computer. Is there a utility that can function like:
copy source target1 target2 ... targetN
|
I have a several large files on optical media I would like to copy to multiple targets - in this case I have two hard drives attached to the same computer. Is there a utility that can function like:
|
||||
|
|
|
For single files you can use
or if you prefer the demoggified version:
Note that as Dennis points out in the comments
You could probably combine one of the above with Edit: |
|||||||
|
|
For Windows: n2ncopy will do this:
For Linux: The
or use xargs:
Both of these will allow you to copy entire directories/multiple files. This is also discussed in this StackOverflow article. |
|||||||
|
|
In bash (Linux, Mac or Cygwin):
(tee copies it's input to STDOUT, so use redirection on the last target). In Windows, Cygwin is often overkill. Instead, you can just add the exes from the UnxUtils project, which include cat, tee, and many others. |
|||
|
|
|
In bash:
|
|||||
|
|
Ryan Thompson's solution:
makes a lot of sense: If write speed of the destination dirs is approximately the same then srcfile will only be read once from disk. The rest of the time it will be read from cache. I would make it a bit more general, so you also get subdirs:
If the write speed of the dest dirs are very different (e.g. one is on a ram disk and the other on NFS), then you may see that the parts of srcdir read while copying srcdir to dest1 is no longer in the disk cache when writing dest2. |
|||
|
|
|
Copy the following code into a new text file and save it as "mycopy.bat"
Copy this file to your \windows directory, Now, bring the command prompt the type : mycopy < source > < target 1 > < target 2 > < target 3 > .. < target 9 > PS: limitation for only 9 arguments. |
|||
|