Argument List too Long
Stephen Gilbert
linuxelf at gmail.com
Sat May 29 23:22:59 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ack, that script should, of course, read
for a in * ; do mv "$a" ../$directory2/ ; done
Sorry for the typo.
On 5/29/2010 7:17 PM, Burke, Thomas G. wrote:
> Yeah, I've had similar problems in the past. I figured a way to discriminate & made a script that broke them up into groups of a couple hundred or so.
>
>
> I'm not at my desk, but I can be reached at 443-603-7308
>
> ----- Original Message -----
> From: redhat-list-bounces at redhat.com <redhat-list-bounces at redhat.com>
> To: redhat-list at redhat.com <redhat-list at redhat.com>
> Sent: Sat May 29 17:41:23 2010
> Subject: Re: Argument List too Long
>
> I'd replace it with a little bash scripting
>
> for a in $ ; do mv "$a" ../$directory2/ ; done
>
>
>
> On 5/29/2010 6:33 PM, 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.
>
>
>> 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 ?
>
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkwBodMACgkQdBNH6NIpz0UWjACg25FMEeKPXT6AYqLjQ1lqPnVL
4fsAniZPbBt3FYDW+oA4f0EeufTQpbi1
=85XO
-----END PGP SIGNATURE-----
More information about the redhat-list
mailing list