Bash Script to move Files

Ow Mun Heng Ow.Mun.Heng at wdc.com
Mon Oct 10 04:37:11 UTC 2005


On Mon, 2005-10-10 at 12:33 +0800, Ow Mun Heng wrote:
> On Fri, 2005-10-07 at 23:02 -0700, Gordon Messmer wrote:
> > 
> > The name of the file that matches the contstraints you described to 
> > "find" is substituted for the {} after -exec.  Since mv expects the 
> > source before the destination, you'd need to use "mv {} /destination"
> 
> or use xargs -i

Actually, that's wrong. just use xargs.

$ find . -iname "*.tmp" -maxdepth 1 -type f | xargs mv '{}' /location


-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 12:36:17 up 2 days, 3:55, 8 users, load average: 1.21, 1.32,
1.07 






More information about the fedora-list mailing list