[ Table Of Contents ][ Answer Guy Current Index ] greetings   bios   1   2   3   4   5   6   7   8   9   10   11   12 [ Index of Past Answers ]

(?) The Answer Gang (!)


By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang, the Editors of Linux Gazette... and You!
Send questions (or interesting answers) to

There is no guarantee that your questions here will ever be answered. Readers at confidential sites must provide permission to publish. However, you can be published anonymously - just let us know!


(?) Bulk File Transfers from Windows to ???

From Brian Schramm on the L.U.S.T List

Answered By Jim Dennis

I have a Linux machine on a cable modem. That server has a lot of files that I need to get to from a Windows machine in another location that is on a dsl line. I have tried samba but it is aparently blocked at the cable co. I think NFS is open but there is no nfs client that I have gotten to work on windows yet I have pcnfs installed on my Debian server and my local 95 machine does not attach to it. I have tried ice-nfs and omni for client software.

Is there a way to do this? Is there a problem in doing this? I am at my wits end.

Please help.

Brian Schramm

(!) [JimD] The approaches you've attempted so far all related to file sharing protocols (NFS, SMB). These are normally only used on the LAN or over VPN or dedicated links. In general you're best approach for a one-time or any periodic file transfers is to archive the files into one large file (a tar file for UNIX and UNIX-like systems, a ZIP file for MS-Windows and MS-DOS systems, a Stuffit or similar file for MacOS boxes). Usually you'd compress the archive as well (gzip or bzip2 for UNIX/Linux, implicit for .zip and .sit files).
Once you have the files archived you can use ftp, scp (SSH copy) or even rsync over ssh to transfer it to the remote system.
Of course this might take a very large amount of temporary file space (usually at least half of the total size of the originals) at each end of the connection. If this is a limiting consideration for your purposes, perhaps burning CDs of the data and shipping them via snail mail might be the bettern approach.
Under UNIX you can avoid the large temporary copy/archive requirements at both ends by archiving into a pipeline (feeding the archive data into a process which transmits the data stream to the remote system) and by having the remote system extract the archive on-the-fly.
This usually would look something like:
cd $SOURCE && tar czvf - $FILE_DIR_LIST | ssh '(cd $DESTINATION && tar xzpf - )'
or possibly like:
ssh '(cd $SOURCE && tar czvf - $FILE_DIR_LIST )' | cd $DESTINATION && tar xzpf -
... depending on whether you want to push the files from the local machine to a remote, or vice versa
For MS-Windows and MS-DOS systems, I have frequently used a Linux boot floppy (like Tom's Root/Boot at: http://www.toms.net/rb) or a bootable CD (like Linuxcare's Bootable Business Card --- at: http://open-projects.linuxcare.com/BBC/index.epl). Basically you boot them up, mount up their FAT or VFAT filesystems and do your thing -- in those cases I've usually had to use netcat in lieu of a proper ssh tunnel; but that's just laziness.
Here's a sample script I use to receive a system backup from a Windows '98 Point of Sale system (which I call "pos1" in by backup file.
#!/bin/sh
  ifconfig eth0 172.17.17.1 netmask 255.255.255.0  broadcast 172.17.17.255
  nc -v -v -n -w 6000 -p 964 -l 172.17.17.2 964 -q 0 | bzip2 -c > $( date +%Y-%m-%d )-pos1.tar.bz2
  ## cp /etc/resolv.conf.not /etc/resolv.conf
  sync
I run this on one system, and then I go to the other system, boot it, configure the network to the ...2 address; as referenced in my nc command above, mount my local filesystems (the C: and D: drives under MS-DOS; create a mbr.bin file using dd if=/dev/hda of=/mnt/mbr.bin count=1 bs=512) and feed the receiver with:
tar cBf - . | nc -p 964 172.17.17.1
(nc is the netcat command).
If I had to manage any Win2K or NT systems I'd probably just install the Cygwin32 tool suite and see if I could use these same tools (tar, nc, ssh, etc) natively). Obviously MacOS X should probably have these tools already ported to it; so similar techniques should work across the board.


This page edited and maintained by the Editors of Linux Gazette Copyright © 2001
Published in issue 68 of Linux Gazette July 2001
HTML script maintained by of Starshine Technical Services, http://www.starshine.org/



[ Table Of Contents ][ Answer Guy Current Index ] greetings   bios   1   2   3   4   5   6   7   8   9   10   11   12 [ Index of Past Answers ]