Argument List too Long

Sanjay Chakraborty sanjaychakrab at gmail.com
Mon May 31 18:26:36 UTC 2010


I have a script and that run every month, In the script it has a mv
command and that moves about 35000 files from one directory to other
directory. In one system it is working but in other system I am
getting "Argument List too Long" error message.

mv* ../$directory2/ cannot work.


I can try with "find $directory -type f -name '*' -exec mv {}
$directory2/. \;"  but I am not sure it will work and it will take
time to do the testing through script modification.

 It is running RHEL 5.1, patching may solve the problem. But I cannot
patch this server soon.

Any one can help about this ?

-- 
Regards.
Sanjay Chakraborty




More information about the redhat-list mailing list