Hi, I'm not the original poster but am interested in this thread and in particular the "xargs" command. I'm not familiar with it, what is it and how does one use it? thanks. -----Original Message----- From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Cliff Sent: Sunday, 30 May 2010 2:41 p.m. To: General Red Hat Linux discussion list Subject: Re: Argument List too Long Why not just use xargs? Sent from my iPhone On May 29, 2010, at 9:42 PM, "Carl T. Miller" <carl@xxxxxxxxxx> wrote: > Sanjay Chakraborty wrote: >> 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. > > Try this: > > ls | while read file; do mv "$file" ../$directory2; done > > c > > > -- > redhat-list mailing list > unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe > https://www.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list ========================================================== For more information on the Television New Zealand Group, visit us online at tvnz.co.nz ========================================================== CAUTION: This e-mail and any attachment(s) contain information that is intended to be read only by the named recipient(s). This information is not to be used or stored by any other person and/or organisation. -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list