scp doesn't work with large (>2GB) files

Darren Moffat Darren.Moffat at eng.sun.com
Thu Sep 13 02:43:11 EST 2001


>On Wed, Sep 12, 2001 at 12:30:08PM +0100, M.C. Vernon wrote:
>> On Wed, 12 Sep 2001, Theo de Raadt wrote:
>> 
>> > O_LARGEFILE is an API that should never have showed up.
>> > 
>> > It is ridiculous twisted bullshit.  Those vendors were foolish.
>> 
>> OTOH, it has showed up. On AIX, HPUX, Solaris and Linux. BSD and Tru64
>> don't have it. Furthermore, using this flag on platforms that support it
>> should have no bad effects (assuming proper error checking).
>> 
>> Using O_LARGEFILE is probably the least worst solution to this problem on
>> Linux at least. 
>
>i still don't see how a flag to open(2) can help if off_t is 32 bit?

Please don't bring Solaris into the justification for passing O_LARGEFILE
to open this is NOT the recommened way to do it.

On Solaris if you are building a 64bit application off_t is 64bit and
open(2) and friends automatically deal with largefiles correctly.

If you are a 32bit application you have a choice but passing O_LARGEFILE
to open is NOT one of them.

For more details see lfcompile(5)

http://docs.sun.com:80/ab2/@LegacyPageView?toc=SUNWab_40_4%3A%2Fsafedir%2Fspac
e3%2Fcoll3%2FSUNWaman%2Ftoc%2FREFMAN5%3A0059_lfcompile.5;bt=man+Pages(5)%3A+He
aders,+Tables+and+Macros;ps=ps%2FSUNWab_40_4%2FREFMAN5%2F0059_lfcompile.5&Ab2L
ang=C&Ab2Enc=iso-8859-1



--
Darren J Moffat




More information about the openssh-unix-dev mailing list