[ale] Shell Scripting -> find files *.<ext> and move them to /backup

Chris Ricker kaboom at gatech.edu
Sat May 8 08:58:01 EDT 2004


On Fri, 7 May 2004, Danny Cox wrote:

> On Thu, 2004-05-06 at 17:53, Jason Etheridge wrote:
> > > find / -name "*.jpg" -exec mv /mnt/mymachine/ {} \;
> > 
> > mv might have trouble across filesystems.  Could do a cp and then a rm.
> 
> 	No, you're thinking of 'ln'.  mv will happily move a file wherever,
> even if it must copy and unlink.

He might be thinking of mv. It now does a copy when going between
filesystems, but that's relatively new, and at least the Gnu mv still has
corner cases turning up where mv'ing between filesystems doesn't always Do
The Right Thing.

later,
chris



More information about the Ale mailing list