Re: Bash Script to move Files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2005-10-08 at 14:48 +1000, Ben Stringer wrote:
> 
> The problem here is that find passes the files as an argument to the "rm
> -rf" command. Ie. "rm -rf file1 path/file2 file3" but in your situation,
> the mv command will be "mv /media/oggs file1 path/file2 file3" which is
> the reverse order of the arguments, to do what you want. To fix this,
> you could write a second, simple script to reverse the arguments. Eg.
> mover.sh

Better still ...

Use "mv --target-directory=/media/oggs" in your find command. The "mv"
authors have anticipated this use case.

Cheers, Ben




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux