find and move files in BusyBox
Posted: Sat Nov 27, 2010 11:17 am
Hello,
I would basically like to write a little script a bit like this (bash) :
But since I don`t have bash installed on the NAS, just ash ( I think ), I have to do something like this :
I get this error :
mv: unable to stat `./test1/{}': Not a directory
Obviously I`m not passing the arguments correctly, anyone knows how to do that properly in Busybox ?
Cheers,
EDIT: or maybe how I can run a bash script from ash
I would basically like to write a little script a bit like this (bash) :
Code: Select all
find . -name '*test*' -exec mv {} / \;
Code: Select all
find . -name '*test*' | xargs mv {} /test;
mv: unable to stat `./test1/{}': Not a directory
Obviously I`m not passing the arguments correctly, anyone knows how to do that properly in Busybox ?
Cheers,
EDIT: or maybe how I can run a bash script from ash