Copy one file to multiple locations with bash globbing (wildcards)

I recently had to copy one php.ini to the individual directories of many users and fell in love with this time saving one-liner:

echo /home/*/etc/php5/php.ini | xargs -n 1 cp php.ini

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>