How to copy a file to multiple directories using the gnu cp command

cp can copy multiple sources but will only copy to a single destination.

You need to arrange to invoke cp multiple times – once per destination – for what you want to do;

 

for i in DESTINATION*; do sudo cp FILENAME “$i”; done

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *