On Thu, Sep 13, 2001 at 09:13:48PM +0100, Matt Johnson wrote:
Ok, why when I type
cp /home/trial/USER.MAN /home/*/
does it reply:
omitting /home/trial2 omitting /home/trial3
errr... I don't know.
I want to copy the files to all directories under home.
Try: # find /home -type d -maxdepth 1 -regex '/home/.*' -exec cp /home/trial/USER.MAN {}/ ; If you want to copy the file to *all* directories under /home (and I don't think you do!) then omit the maxdepth option. It's always worth testing first without the -exec option to make sure that find finds the directories you're interested in before commitimg yourself - especially if you're using rm as an argument to -exec ;-) Powerful tool `find' & one worth learning for all sorts of file management purposes eg. backups, creating tarballs. Good manpage and also info page for some examples. -- Frank *-*-*-*-*-*-*-*-*-*-* Boroughbridge. Tel: 01423 323019 --------- PGP keyID: 0xC0B341A3 *-*-*-*-*-*-*-*-*-*-* http://www.esperance-linux.co.uk/