Argument List too Long



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

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: FTP delete problem
    ... But i have wrote that manually the delete command it's OK!!! ... Dim strLocalFolderName, strFTPServerName, strLoginID ... In my script I use the options -s for the file. ... If i am in session in the server the scheduled script result OK. ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: specify SMTP relay server in mutt
    ... Your command is syntactically correct. ... On that SMTP server 172.20.1.92, I certainly could send emails out using ... the mailx with RHEL6 supports specifying a remote smtp server ... program that runs when you execute it from the command line or script. ...
    (RedHat)
  • Re: Problems trying to configure Linux laptop to print to Windows XP shared printer
    ... map to guest = Never ... check password script = ... enumports command = ... ldap delete dn = No ...
    (comp.os.linux.setup)
  • Problems trying to configure Linux laptop to print to Windows XP shared printer
    ... map to guest = Never ... check password script = ... enumports command = ... ldap delete dn = No ...
    (comp.os.linux.setup)
  • Re: iterating through a list of servers to issue a T-SQL ?
    ... Is it possible from command line to do this? ... Note that you can run the same script on multiple instances from SQL 2008 SSMS by creating a registered server group with the desired servers and opening a multi-server query window from that group node. ... FETCH NEXT FROM DatabaseList INTO @DatabaseName; ...
    (microsoft.public.sqlserver.server)