[X-Unix] Copying to multiple directories

Brian Medley bpm-list-osx-unix at 4321.tv
Wed Mar 10 18:12:50 PST 2004


On Wed, Mar 10, 2004 at 07:32:36PM -0600, Harvey Riekoff wrote:

> I need to copy "fileA" to every users library folder in the Users 
> directory. The file resides at t he root level. The command that I have 
> been using is: cp -r fileA /Users/*/Library.  There is obviously 
> something that I am doing wrong because nothing is copying. Any help 
> would be appreciated.

$ ls -d /Users/*/Library | xargs -I % echo cp fileA %
cp fileA /Users/bpm/Library
cp fileA /Users/jasonp/Library
cp fileA /Users/jmh/Library

-- 
~`^`'~=-._.-=~'`^`'~=-._.-=~'^'~=-., \|/  (___)  \|/ _,.-=~'`^`
                                      @~./'O o`\.~@
      "Knowledge is Power"           /__( \___/ )__\  *PPPFFBT!*
         -- Francis Bacon               `\__`U_/'
 _.-=~'``'~=-._.-=~'``'~=-._.-=~'`^`'~= <____|'  ^^`'~=-.,__,.-=
~'^`'~=-._.-=~'`^`'~=-._.-=~'^'~=-.,__,.-==--^'~=-.,__,.-=~'`^`



More information about the X-Unix mailing list