Miark wrote:

>I would like to copy a single file to multiple directories
>that are parallel to each other. I was thinking that I
>could, for instance
>
>   cp /original/file.txt /home/*/file.txt
>
>to get file.txt into everybody's home directory. But the
>asterisk isn't working. What's the correct way? Or can
>this not be done?
>
>Miark
>
>
>------------------------------------------------------------------------
>
>Want to buy your Pack or Services from MandrakeSoft? 
>Go to http://www.mandrakestore.com
>
for i in `ls /home/`; do cp /original/file.txt /home/${i}/file.txt ; done

Of course, tis more useful if you make a script file so "original" and 
"file" can be $1 and $2...

And it would be even better if it were stored in /usr/sbin cause you 
will need to be root to make this work anyway.

Civileme


Civileme




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to