I have a file I want to copy to a few directories at once.
the file is located in /var/www/dir0/myfile.txt and I want to copy it to the following:
/var/www/dir1/
/var/www/dir2/
/var/www/dir3/
/var/www/dir4/
so I tried to use:
I got:
it is.
I also tried
and got:
ofcourse I tried things like cp /var/www/dir0/myfile.txt /var/www/dir[0-9]/
also tried using the -r parameter.
I am root on the server.
what'chya say?
the file is located in /var/www/dir0/myfile.txt and I want to copy it to the following:
/var/www/dir1/
/var/www/dir2/
/var/www/dir3/
/var/www/dir4/
so I tried to use:
Code:
cp /var/www/dir0/myfile.txt /var/www/dir*/myfile.txt
Code:
cp: copying multiple files, but last argument `/var/www/dir2/myfile.txt' is not a directory
I also tried
Code:
cp /var/www/dir0/myfile.txt /var/www/dir*/
Code:
cp: omitting directory `/var/www/dir0'
also tried using the -r parameter.
I am root on the server.
what'chya say?

Comment