Thank you gentleman for both your suggestions. I finally got it working as such:<br><br>sender:<br>find . -name \*.mp3 -print0 | xargs -0 tar -czvf - | netcat 10.0.0.1 1234<br><br>receiver:<br>nc -l -p 1234 -q10 | pv -b > MP3.tgz<br>
<br> the -q will stop listening when it received EOF from netcat pipe. and the pv -b gives me a idea of how much has been sent through the pipe.<br>-kupo<br><br><div class="gmail_quote">On Mon, Feb 23, 2009 at 12:26 AM, Akira <span dir="ltr"><<a href="mailto:public@raideen.org">public@raideen.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">~ ~ wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm attempting to salvage some media files from a laptop that had windows running on it. I've booted a livecd an I've connected another laptop to dump to via firewire (works pretty awesome with eth1394) so I'm using netcat for speed (over 10gb of media) . I want to do something along the lines of:<br>
find . -name \*.mp3 -exec tar cfv - '{}' | netcat hostip 1234<br>
receiving machine is doing :<br>
netcat -l -p 1234 > Mp3.tar<br>
but it's not working, mainly I think because I'm attempting to just create with one file as oppossed to append them to the archive. so I've tried tar with -r or -A but still no dice. What am I doing wrong here?<br>
</blockquote>
<br></div></div>
You forgot to escape the exec command:<br>
find . -name \*.mp3 -exec tar -cv {} \; | netcat hostip 1234<br>
<br>
Besides that, -exec will also call tar for every file unless you terminate it with a + so in your example, you're creating a new file every time. Appending doesn't work when outputting to stdout so you could do something like this instead.<br>
<br>
find . -name \*.mp3 -exec tar -cv {} + | netcat hostip 1234<br>
<br>
However, with 10GB of MP3s, I'd imagine that the file list would be very long so that's probably not a good idea. If you don't mind having the files extracted at the other end, you could do something like this:<br>
<br>
on the sender:<br>
find . -name \*.mp3 -exec tar -c {} \; | netcat hostip 1234<br>
<br>
on the receiver:<br>
netcat -l -p 1234 | tar -xv<br><font color="#888888">
<br>
--Akira</font><div><div></div><div class="Wj3C7c"><br>
<br>
_______________________________________________<br>
Lilug mailing list<br>
<a href="mailto:Lilug@lilug.org" target="_blank">Lilug@lilug.org</a><br>
<a href="http://lists.lilug.org/listinfo.cgi/lilug-lilug.org" target="_blank">http://lists.lilug.org/listinfo.cgi/lilug-lilug.org</a><br>
</div></div></blockquote></div><br>