Copy files gives "cp: omitting directory" error

I tried to copy data from one location to multiple location my typing...
cp <source> <dest> <dest>

however this will omits one of the destination ... and proceed to copy to only one directory

Yes, so has cp done forever.
man cp
give answer.

Answer for your problem ? You have to give two commandlines
cp source dest1
cp source dest2

cp can do copy from multiple sources, but not to multiple destinations. In this case, it takes the first 2 arguments as sources, and the last done as destination. Since the second argument is a directory, cp needs "-R' option to copy.

1 Like