I also tested this on an NTFS filesystem, and I was also able to write filenames of up to 255 characters.
It might be that you're trying to write the file to a different filesystem (FAT perhaps) - could you confirm? Also, if you're inclined to do so, you could find out the maximum suported filename length using the technique I describe above, for the filesystem you're using. This might have another limit and that's why you get the "filename too long" error.
Please note that wget lets you specify the output filename, for cases such as this one, and thus the following command should work for you:
I'll mark this as incomplete awaiting your confirmation of the actual filesystem you're using and/or the filename length for your particular filesystem, once we have that information we could choose what to do (most likely, wait to see what upstream decides).
Hi Christopher,
I tried reproducing this problem:
wget -c "http:// www.microsoft. com/downloads/ info.aspx? na=41&SrcFamily Id=1CD6ACF9- CE06-4E1C- 8DCF-F33F669DBC 3A&SrcDisplayLa ng=en&u= http%3a% 2f%2fdownload. microsoft. com%2fdownload% 2fe%2fa% 2f9%2fea913c8b- 51a7-41b7- 8697-9f0d0a7274 aa%2fExcelViewe r.exe"
then I get a 75-MByte file named:
info.aspx? na=41&SrcFamily Id=1CD6ACF9- CE06-4E1C- 8DCF-F33F669DBC 3A&SrcDisplayLa ng=en&u=http:%2F% 2Fdownload. microsoft. com%2Fdownload% 2Fe%2Fa% 2F9%2Fea913c8b- 51a7-41b7- 8697-9f0d0a7274 aa%2FExcelViewe r.exe
this name is 199 characters long, and wget had no problem writing the file.
On an Ubuntu 11.04 system with ext4 filesystem, the longest possible filename is 255 characters long. To test:
wget http:// www.yahoo. com -O "$(python -c 'print "A"*255')" should succeed. www.yahoo. com -O "$(python -c 'print "A"*256')" should fail.
wget http://
I also tested this on an NTFS filesystem, and I was also able to write filenames of up to 255 characters.
It might be that you're trying to write the file to a different filesystem (FAT perhaps) - could you confirm? Also, if you're inclined to do so, you could find out the maximum suported filename length using the technique I describe above, for the filesystem you're using. This might have another limit and that's why you get the "filename too long" error.
Please note that wget lets you specify the output filename, for cases such as this one, and thus the following command should work for you:
wget -c "http:// www.microsoft. com/downloads/ info.aspx? na=41&SrcFamily Id=1CD6ACF9- CE06-4E1C- 8DCF-F33F669DBC 3A&SrcDisplayLa ng=en&u= http%3a% 2f%2fdownload. microsoft. com%2fdownload% 2fe%2fa% 2f9%2fea913c8b- 51a7-41b7- 8697-9f0d0a7274 aa%2fExcelViewe r.exe" -O ExcelViewer.exe
I'll mark this as incomplete awaiting your confirmation of the actual filesystem you're using and/or the filename length for your particular filesystem, once we have that information we could choose what to do (most likely, wait to see what upstream decides).
Thanks!
--- wiki.ubuntu. com/BugSquad
Ubuntu Bug Squad volunteer triager
http://