[X-Unix] Copying to multiple directories
Eugene Lee
list-themacintoshguy at fsck.net
Thu Mar 11 11:28:15 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.
This solution works for Bourne shell derivatives:
for d in /Users/*/Library; do cp "fileA" "${d}"; done
Replace "cp" with "ditto -rsrc" if you need to copy over resource forks.
--
Eugene Lee
http://www.coxar.pwp.blueyonder.co.uk/
More information about the X-Unix
mailing list