How to copy a 4 GB file from a Linux server to a Windows client?

Electrode

Diamond Member
May 4, 2001
6,063
2
81
Hey all. I've been having a hell of a time trying to get a very large (4 gigs to be exact) binary file from my Linux fileserver to my Windows box. Everything I've done so far has failed for a different reason, but the constant is that they've all failed.

SCP: Too big
SMB, FTP: File doesn't show up in listings, get returns file not found
HTTP: 403 Forbidden

An obvious solution would be to take the hard drive out of the Windows box, put it in the Linux server, copy the file, take the HD out, and put it back in the Windows box. The thing is, that would require server downtime, and pulling the server itself out of the little hole it's in isn't an easy process. I want to do it over the LAN if at all possible.

So, suggestions? I know splitting the file into ~1 GB fragments would be a good idea, but re-assembling them on the Windows box would be the hard part.
 

dartblazer

Senior member
Aug 18, 2000
492
0
71
have you tried instead of copying Windows < Linux. Linux > Windows.

Meaning, actually being on the linux machine and copying to the windows box? I dont know if that would help, but hey its worth a try.
 

Electrode

Diamond Member
May 4, 2001
6,063
2
81
Yes, I have tried doing it that way with SMB. The transfer stalled at exactly 2048 MB and refused to go further.
 

Mitzi

Diamond Member
Aug 22, 2001
3,775
1
76
What file system is the Windows machine using?

FAT has a 2Gb file size, FAT32 has a 4Gb file size and NTFS doesn't have a restriction on file size (well obviously it depends on the size of the drive).
 

thornc

Golden Member
Nov 29, 2000
1,011
0
0
Well NTFS does have a file size limit, but I doubt he can get to it
so soon... 4TeraBytes!

edit: and btw electrode...
1GigaByte=1024MegaBytes
1MegaByte=1024KiloBytes
1KiloByte=1024Bytes
1Byte=8Bits

:p

We in the Computer science business use the base 2! not
the Base 10 that everyone else uses... that's why those
corporate managers use that ridiculous 1GB=1000MB...
And that's why I seen so many people complaning that
they bought a 40GB harddisk and it only has 39GB of space...
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
What kernel version is the Linux box using? You need 2.4.x or 2.2+LFS patches for support of files >2G.

Also the program has to be compiled using a kernel with LFS support to be able to use them.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0


<< What kernel version is the Linux box using? You need 2.4.x or 2.2+LFS patches for support of files >2G.

Also the program has to be compiled using a kernel with LFS support to be able to use them.
>>



Well, he said the 4GB file already resides on the Linux box, so he must be using a 2.4 or 2.2 + LFS.
I wonder what version though. If it was originally a 2.2 box that was patched up to 2.4 or 2.2+LFS, then some of the apps (ftp, etc) may need to be recompiled with the new libraries to support > 2GB files. I had this problem with Samba on a RH6.2 box that was patched up to 2.4.* specifically to support > 2GB files.

The other question of course is what filesystem the Windows box is running.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The other question of course is what filesystem the Windows box is running.

That would only matter if it was FAT16 because FAT32 supports 4G files as well as NTFS.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0


<< The other question of course is what filesystem the Windows box is running.

That would only matter if it was FAT16 because FAT32 supports 4G files as well as NTFS.
>>



But is the file exactly 4 gig, or maybe a little over? Or maybe his Win box is running 95 :Q

As for splitting ... you don't need gtk-split, just the normal command line split. The problem is whether you can reliably put it back together on the Windows side.
 

freebsddude

Senior member
Jan 31, 2002
298
0
0
I am not sure I understood your ftp comment. Why can't you ftp ? The file does not show up
when ftp'ing from windows ? If so, don't you think it may be a permissions issue ?

Who is the file owner on linux ? Does the file not show up when ftping (logging) into the linux box from
windows as that owner account ?
 

Electrode

Diamond Member
May 4, 2001
6,063
2
81
Answers to most questions, I think:

1. Linux kernel: 2.4.3 (the server runs Mandrake)
2. Windows filesystem: NTFS
3. File permissions: 666
4. The correct meaning of a gigabyte is 1000 megabytes. Look it up.
5. I have tried split, but I'm not sure how to reassemble the file on windows. The needed program is probably included in Cygwin (which I have), but I dunno what it is or how to use it.
6. The file is owned by Linux user electrode.
7. It DOES show up in ls when I log in with SSH.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
4. thornc, you must die. The correct meaning of a gigabyte is 1000 megabytes Look it up.

Only if you're a hard drive manufacturer, the ibi sh!it hasn't caught on and probably never will.

5. I have tried split, but I'm not sure how to reassemble the file on windows. The needed program is probably included in Cygwin (which I have), but I dunno what it is or how to use it.

If it doesn't have it's own header information on the chunks, you could use 'copy file1+file2+file3 file4' to append them in Windows IIRC.
 

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
i have to agree with nothinman, all computer science is based upon binary arithmetic. 1 kilobyte is 1024 bytes. does kilo mean 1000? yes. does that make 1000 bytes a kilobyte? technically yes if you go by the definition of the word kilo, but not as far as binary arithmetic is concerned. From now on, if you see anything the marketing jackasses write, simply ignore it.

if you can log in via ssh, then try getting sftp (or psftp from putty for your windows client) and get the file that way. it acts the same way as a regular ftp cli client, but is transferred over ftp. it is a little slower than regular ftp but should work.

 

thornc

Golden Member
Nov 29, 2000
1,011
0
0


<< 4. The correct meaning of a gigabyte is 1000 megabytes. Look it up. >>


The Link you supplied confirms my statement.... 1KByte=1024Bytes and so one, we're in computer science here base two applies...



<< 5. I have tried split, but I'm not sure how to reassemble the file on windows. The needed program is probably included in Cygwin (which I have), but I dunno what it is or how to use it. >>


I shouldn't teach you this :p, but here goes, get the all the split files in one directory and in a dos console
type: copy /b <common part>* <filename>

Good luck...
 

Electrode

Diamond Member
May 4, 2001
6,063
2
81
Thanks. Hopefully that /b switch will cause it to work. I tried doing it without and it always made a ~6K file.

Either way, I have dispatched my evil mutant zombie death squad. You, and all who stood behind you in your argument about the value of a gigabyte, shall be dead by tomorrow. :D