263 lines
10 KiB
HTML
263 lines
10 KiB
HTML
<!--startcut ======================================================= -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html>
|
|
<head>
|
|
<META NAME="generator" CONTENT="lgazmail v1.3E.w">
|
|
<TITLE>The Answer Gang 68: Bulk File Transfers from Windows to ???</TITLE>
|
|
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
|
|
LINK="#3366FF" VLINK="#A000A0">
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<P> <hr>
|
|
<CENTER>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<!-- *** END navbar *** -->
|
|
</CENTER>
|
|
</p>
|
|
<P> <hr> <P>
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<p align="center">
|
|
<table width="100%" border="0"><tr>
|
|
<td align="right" valign="center"
|
|
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
|
|
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
|
|
><A HREF="..//"
|
|
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
|
|
ALT="[ Table Of Contents ]" border="0"></A
|
|
><A HREF="../lg_answer68.html"
|
|
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
|
|
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
|
|
<td align="center" valign="center"><A HREF="../lg_answer68.html#greeting"><img align="middle"
|
|
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A>
|
|
<A HREF="bios.html">bios</A>
|
|
<A HREF="1.html">1</A>
|
|
<A HREF="2.html">2</A>
|
|
<A HREF="3.html">3</A>
|
|
<A HREF="4.html">4</A>
|
|
<A HREF="5.html">5</A>
|
|
<A HREF="6.html">6</A>
|
|
<A HREF="7.html">7</A>
|
|
<A HREF="8.html">8</A>
|
|
<A HREF="9.html">9</A>
|
|
<A HREF="10.html">10</A>
|
|
<A HREF="11.html">11</A>
|
|
<A HREF="12.html">12</A>
|
|
</td>
|
|
<td align="left" valign="center"><A HREF="../../tag/kb.html"
|
|
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
|
|
ALT="[ Index of Past Answers ]" border="0"></A
|
|
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
|
|
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
|
|
</p>
|
|
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<center>
|
|
<H1><A NAME="answer">
|
|
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
|
|
border="0" align="middle">
|
|
<font color="#B03060">The Answer Gang</font>
|
|
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
|
|
border="0" align="middle">
|
|
</A></H1>
|
|
<BR>
|
|
<H4>By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang,
|
|
the Editors of Linux Gazette...
|
|
and You!
|
|
<br>Send questions (or interesting answers) to
|
|
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a>
|
|
</H4>
|
|
<p><em><font color="#990000">There is no guarantee that your questions
|
|
here will <b>ever</b> be answered. Readers at confidential sites
|
|
must provide permission to publish. However, you can be published
|
|
anonymously - just let us know!
|
|
</font></em></p>
|
|
</center>
|
|
|
|
<p><hr><p>
|
|
<!-- endcut ======================================================= -->
|
|
<!-- begin 4 -->
|
|
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
|
|
height="50" width="60" alt="(?) " border="0"
|
|
>Bulk File Transfers from Windows to ???</H3>
|
|
|
|
|
|
<p><strong>From Brian Schramm on the L.U.S.T List
|
|
</strong></p>
|
|
<p align="right"><strong>Answered By Jim Dennis
|
|
</strong></p>
|
|
<!-- ::
|
|
Bulk File Transfers from Windows to ???
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
:: -->
|
|
<P><STRONG>
|
|
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
|
|
<A HREF="http://www.debian.org/">Debian</A> server
|
|
and my local 95 machine does not attach to it. I have tried ice-nfs and
|
|
omni for client software.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
Is there a way to do this? Is there a problem in doing this? I am at my
|
|
wits end.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
Please help.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
Brian Schramm
|
|
</STRONG></P>
|
|
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [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).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
This usually would look something like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQuote><code>
|
|
cd $SOURCE && tar czvf - $FILE_DIR_LIST | ssh <A HREF="mailto:someone@somehost"
|
|
>someone@somehost</A> '(cd $DESTINATION && tar xzpf - )'
|
|
</code></BLOCKQuote></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
or possibly like:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
ssh <A HREF="mailto:someone@somehost"
|
|
>someone@somehost</A> '(cd $SOURCE && tar czvf - $FILE_DIR_LIST )' | cd $DESTINATION && tar xzpf -
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
... depending on whether you want to push the files from the local
|
|
machine to a remote, or vice versa
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
For MS-Windows and MS-DOS systems, I have frequently used a Linux boot
|
|
floppy (like Tom's Root/Boot at: <A HREF="http://www.toms.net/rb"
|
|
>http://www.toms.net/rb</A>) or a bootable
|
|
CD (like <A HREF="http://www.linuxcare.com/">Linuxcare</A>'s Bootable Business Card --- at:
|
|
<A HREF="http://open-projects.linuxcare.com/BBC/index.epl"
|
|
>http://open-projects.linuxcare.com/BBC/index.epl</A>). 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.
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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.
|
|
</BLOCKQUOTE>
|
|
|
|
<blockquote><pre>#!/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
|
|
</pre></blockquote>
|
|
<BLOCKQUOTE>
|
|
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:
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE><BLOCKQUOTE><CODE>
|
|
tar cBf - . | nc -p 964 172.17.17.1
|
|
</CODE></BLOCKQUOTE></BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
(nc is the netcat command).
|
|
</BLOCKQUOTE>
|
|
<BLOCKQUOTE>
|
|
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.
|
|
</BLOCKQUOTE>
|
|
|
|
|
|
<!-- end 4 -->
|
|
<!--startcut ======================================================= -->
|
|
<P> <hr> </p>
|
|
<!-- *** BEGIN copyright *** -->
|
|
<H5 align="center">This page edited and maintained by the Editors
|
|
of <I>Linux Gazette</I>
|
|
<a href="http://www.linuxgazette.com/copying.html"
|
|
>Copyright ©</a> 2001
|
|
<BR>Published in issue 68 of <I>Linux Gazette</I> July 2001</H5>
|
|
<H6 ALIGN="center">HTML script maintained by
|
|
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
|
|
Starshine Technical Services,
|
|
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
|
|
</H6>
|
|
<!-- *** END copyright *** -->
|
|
<P> <hr>
|
|
<P> <hr>
|
|
<CENTER>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<!-- *** END navbar *** -->
|
|
</CENTER>
|
|
</p>
|
|
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<p align="center">
|
|
<table width="100%" border="0"><tr>
|
|
<td align="right" valign="center"
|
|
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
|
|
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
|
|
><A HREF="..//"
|
|
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
|
|
ALT="[ Table Of Contents ]" border="0"></A
|
|
><A HREF="../lg_answer68.html"
|
|
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
|
|
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
|
|
<td align="center" valign="center"><A HREF="../lg_answer68.html#greeting"><img align="middle"
|
|
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A>
|
|
<A HREF="bios.html">bios</A>
|
|
<A HREF="1.html">1</A>
|
|
<A HREF="2.html">2</A>
|
|
<A HREF="3.html">3</A>
|
|
<A HREF="4.html">4</A>
|
|
<A HREF="5.html">5</A>
|
|
<A HREF="6.html">6</A>
|
|
<A HREF="7.html">7</A>
|
|
<A HREF="8.html">8</A>
|
|
<A HREF="9.html">9</A>
|
|
<A HREF="10.html">10</A>
|
|
<A HREF="11.html">11</A>
|
|
<A HREF="12.html">12</A>
|
|
</td>
|
|
<td align="left" valign="center"><A HREF="../../tag/kb.html"
|
|
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
|
|
ALT="[ Index of Past Answers ]" border="0"></A
|
|
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
|
|
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
|
|
</p>
|
|
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
</BODY></HTML>
|
|
<!--endcut ========================================================= -->
|