move command

Hi,

I am using SOLARIS 9.

I am trying to move a huge number of files using the mv commands below-

#mv inbuffer/* /tmp/inbuffer/

but system says arguments too long..

Could u please tell which command i need to put for moving AND copying ???

Many Thanks in advance--
Purple

there is a system defined limit for the number of arguments used for each of the commands

you could try something like this

ls files* | while read file
do
mv "$file" ../otherdirectory/.
done

Hi matrix,

movehugefiles not yet solve. I did the follwoing things..

#vi movehugefiles.sh

#!/usr/bin/sh
file=/home/hugefile/tmp/

ls /home/hugefile/tmp/* | while read file
do
mv "$file" /tmp/hugefile/
done

#./movehugefiles.sh
./movehugefiles.sh: /bin/ls: arg list too long
---------

find /home/hugefile/tmp/ -type f -print | xargs -I{} mv {} /tmp/hugefile

Cheers,
ZB