in reply to Re^2: Optimizing files' moving with File::Find & File::Copy modules
in thread Optimizing files' moving with File::Find & File::Copy modules
Spaces and special characters aren't a problem as find doesn't invoke a shell. And by using a + instead of a ;, the -exec will behave as xargs.system "find $dir1 -type f -exec mv -t $dir2 '{}' '+'";
You may need GNU implementations of find and mv, I do not know whether mv -t is a POSIX requirement, nor do I know that of find -exec command . But I doubt it's much of a problem to get those GNU tools running on a platform that supports perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Optimizing files' moving with File::Find & File::Copy modules
by runrig (Abbot) on Nov 17, 2009 at 17:16 UTC | |
by JavaFan (Canon) on Nov 17, 2009 at 17:27 UTC | |
by runrig (Abbot) on Nov 17, 2009 at 17:42 UTC |