sudo su -
mount /dev/sda2 /mnt
cd /mnt
tar c . | nc -l -p 10000
sudo su -
mkfs -t ext3 -L root /dev/sda3
mkfs -t ext3 -L home /dev/sda4
mount /dev/sda3 /mnt
mkdir /mnt/home
mount /dev/sda4 /mnt/home
cd /mnt
nc 192.168.1.3 10000 -q5 | tar xv --numeric-owner
cp -av so I'm not looking for ways to get the primary job done any more.nc so forgive me if I'm missing something, but:tar paired with the listener nc. This seems kind of counterintuitive because it relies on nc to queue bytes to send to the consumer tar once the connection is made. In other words, the laptop's nc has to queue all the data being spewed out by tar until the desktop connects and the data can be offloaded over the network. I'd expect you to create the consumer tar on the desktop together with the listener nc then cause the producer tar to initiate the connection. Basically, swap the arguments to nc between the desktop and the laptop.rsync?$ echo "/dev/null" | cpio -o | sudo cpio -i --make-directories
1 block
cpio: Removing leading `/' from member names
1 block
$ ls -l /dev/null dev/null
crw-rw-rw- 1 root wheel 0, 10 Sep 26 20:31 /dev/null
crw-rw-rw- 1 root wheel 0, 10 Sep 26 20:32 dev/null
tar c . | nc -l -p 10000
nc 192.168.1.3 10000 -q5 | tar xv --numeric-owner
dd if=/dev/sdX | ncnc </dev/sdXroot@jellybelly:~# fdisk -l
Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000a1d3
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1824 14651248+ 83 Linux
/dev/sda2 1825 2197 2996122+ 82 Linux swap / Solaris
/dev/sda3 2198 111616 878908117+ 83 Linux
root@jellybelly:~# time cat </dev/sda2 >/dev/null
real 0m28.881s
user 0m0.160s
sys 0m6.292s
root@jellybelly:~# time dd if=/dev/sda2 of=/dev/null
5992245+0 records in
5992245+0 records out
3068029440 bytes (3.1 GB) copied, 28.4318 s, 108 MB/s
real 0m28.606s
user 0m2.332s
sys 0m11.557s
root@jellybelly:~# time dd if=/dev/sda2 of=/dev/null bs=1M
2925+1 records in
2925+1 records out
3068029440 bytes (3.1 GB) copied, 28.9733 s, 106 MB/s
real 0m28.978s
user 0m0.032s
sys 0m13.889s
root@jellybelly:~#
You are not logged in, either login or create an account to post comments
man ncon my linux box, see the italicized bit:-l Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host. It is an error to use this option in conjunction with the -p, -s, or -z options. Additionally, any timeouts specified with the -w option are ignored.posted by axiom at 6:16 PM on September 26