syserror@bugs.zoo (06/08/91)
Greetings, Sometimes when using FTP, after using an 'mget *.xyz' I get the message 'File arguments too long' whereupon none of the get or put commands will function anymore. Others have also reported the problem. Yet nowhere have I seen it documented. Does anyone have an explanation for this odd behavior? Is it a bug?
imp@solbourne.com (Warner Losh) (06/12/91)
In article <1991Jun7.222936.24697@ucselx.sdsu.edu> syserror@bugs.zoo writes: >Sometimes when using FTP, after using an 'mget *.xyz' I get >the message 'File arguments too long' whereupon none of the get >or put commands will function anymore. It may help to know what system you are getting this on. I would bet money that it's a unix box and that you have a LOT of files called xxx.xyz. There are fixed limits to the size of the argument list in unix. BSD's ftpd just forks a process to get the list. As part of the process, the file names get expanded. In this expansion, there are so many files that this fixed limit gets exceded, hence the error message. I'd say that it is a BUG since there are no arbirary limits imposed by the FTP protocol. The reason that none of the get/put comands work anymore is that there was "garbage" on the FTP command connection, so everything gets out of sync. I'd maintain this is also a bug since a conforming server shouldn't do this either. A work around? I'm not sure if there is one. Maybe you can use shorter filenames. Or CD to the directory where the files are (after all, mget * takes up a lot less space than mget /usr/home/graphics/imp/foo/bar/bas/bang/* since the path isn't repeated for each element. You may try grouping the remote files by type in some way. Warner -- Warner Losh imp@Solbourne.COM Free to a good home: 10,000 Miller Moths. Must promise not to breed them.
suresh@uts.amdahl.com (Suresh Padmanabhan) (06/15/91)
From postnews Fri Jun 14 15:26:52 1991 > In article <1991Jun7.222936.24697@ucselx.sdsu.edu> syserror@bugs.zoo writes: > >Sometimes when using FTP, after using an 'mget *.xyz' I get > >the message 'File arguments too long' whereupon none of the get > >or put commands will function anymore. > >> A variable is used to limit the number of file-arguments when wildcard >> expansion is performed. I have encountered that same message when this >> variable was defined as a short. This value gets initialized to a value >> greater than the defined storage and thereby becomes negative. The >> solution is to define this variable as an unsigned int. ------ suresh