How shall I fast and reliably transfer 300G files from a computer to another?
I want to transfer ~300G files from a laptop to other in the same local wifi network, for back up purpose. (I am running out of the space of my only external hard drive, and can't afford anything. Someone was kind enough to leave an old laptop in a dumpster for me to uncover.) Both now run Lubuntu.
What is the fastest and reliable way to transfer the files? By rsync, scp, or some other commands? Could you also give some concrete commands to transfer for example two directories (and the files under them)?
How is the transfer speed of the command you will use compared to using an external hard drive to physcially connect in turn to the computers via a USB cable and perform the transfer indirectly, If there is another external hard drive available in a dumpster in the future ?
Thanks.
backup file-transfer
add a comment |
I want to transfer ~300G files from a laptop to other in the same local wifi network, for back up purpose. (I am running out of the space of my only external hard drive, and can't afford anything. Someone was kind enough to leave an old laptop in a dumpster for me to uncover.) Both now run Lubuntu.
What is the fastest and reliable way to transfer the files? By rsync, scp, or some other commands? Could you also give some concrete commands to transfer for example two directories (and the files under them)?
How is the transfer speed of the command you will use compared to using an external hard drive to physcially connect in turn to the computers via a USB cable and perform the transfer indirectly, If there is another external hard drive available in a dumpster in the future ?
Thanks.
backup file-transfer
add a comment |
I want to transfer ~300G files from a laptop to other in the same local wifi network, for back up purpose. (I am running out of the space of my only external hard drive, and can't afford anything. Someone was kind enough to leave an old laptop in a dumpster for me to uncover.) Both now run Lubuntu.
What is the fastest and reliable way to transfer the files? By rsync, scp, or some other commands? Could you also give some concrete commands to transfer for example two directories (and the files under them)?
How is the transfer speed of the command you will use compared to using an external hard drive to physcially connect in turn to the computers via a USB cable and perform the transfer indirectly, If there is another external hard drive available in a dumpster in the future ?
Thanks.
backup file-transfer
I want to transfer ~300G files from a laptop to other in the same local wifi network, for back up purpose. (I am running out of the space of my only external hard drive, and can't afford anything. Someone was kind enough to leave an old laptop in a dumpster for me to uncover.) Both now run Lubuntu.
What is the fastest and reliable way to transfer the files? By rsync, scp, or some other commands? Could you also give some concrete commands to transfer for example two directories (and the files under them)?
How is the transfer speed of the command you will use compared to using an external hard drive to physcially connect in turn to the computers via a USB cable and perform the transfer indirectly, If there is another external hard drive available in a dumpster in the future ?
Thanks.
backup file-transfer
backup file-transfer
edited Feb 18 at 15:18
Tim
asked Feb 18 at 14:02
TimTim
27.4k78264475
27.4k78264475
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
On machine receiver.example.com:
cd /destination
socat -u tcp-listen:33333,reuseaddr - | gunzip | pv -trab | bsdtar xpSf -
Then on machine sender.example.com:
cd /source
bsdtar cf - . | pigz -3 | socat -u - tcp:receiver.example.com:33333
Transfer speed will depend on how fast and reliable your WiFi connection is and how compressible your data is (possibly how fast the CPU is if the laptop is really old and the compression ends up being the bottleneck).
You may need to install the bsdtar
, pigz
, socat
and pv
packages.
1
Is it possible to recover/continue if connection is disrupted during transfer?
– sebasth
Feb 18 at 14:50
1
@sebasth, not really, you'd want to resume withrsync
.
– Stéphane Chazelas
Feb 18 at 14:52
2
@sebasth, if the wifi speed ends up being the bottleneck (likely), thenrsync
with the right--compress
options could give you approaching performances.
– Stéphane Chazelas
Feb 18 at 14:54
1
Sometimes it's worth breaking the work up into smaller chunks (instead of transferring all the files in one go, do it in by subdirectory for example) so on failure you don't have to retransmit as much.
– Stephen Harris
Feb 18 at 14:56
add a comment |
rsync
is rather standard tool for transferring files. One advantage of rynsc
is also that it can resume interrupted transfers.
It use ssh
to transfer the data over network:
rsync [OPTION...] SRC... [USER@]HOST:DEST
For example (-a
archive, -z
compress, -v
verbose):
rsync -avz /local/path user@remote:/remote/path
You can also use rsync
for copying to local path (external HDD, NFS mount, etc).
add a comment |
1> go to MediaMarkt
2> buy a 500GB USB Hard drive
3> transfer your data onto that HD
4> plug the HD to destination machine
5> transfer data on destination machine
(considering an HDD) USB2 ~25MiB/s, USB3 ~80MiB/s,
ethernet 100Mbps ~12MiB/s, ethernet 1Gbps ~120MiB/s
Thanks. I am not sure how to understand "ethernet 100MBps ~12MiB/s, ethernet 1Gbps ~120MiB/s". Are both for ethernet? Do you mean a range by "100MBps ~12MiB/s"? Are MBps and MiB/s the same unit?
– Tim
Feb 18 at 14:44
No those are not. 1 Mb = megaBIT = 1 000 000 bit, 1 MiB MebiByte = 1024 KiByte = 1 048 576 Byte = 8 388 608 bit, 1 MB = 1 MegaByte = 1000 kByte = 1 000 000 Byte = 8 000 000 bit (1 byte=8bit, M = 10^6, Mi = 2^20)
– DDS
Feb 18 at 14:50
add a comment |
I use these two netcat (nc
) scripts to send/receive a directory tree
- The sender needs to know the receiver IP
- The receiver needs to be run from the parent directory where the received directory will be opened up
- The receiver needs to be started before sender
- Assumed that the two linux (or netcat having) computers are on the same net
- And in walking (or shout-across-the-hallway) distance. Adjust the 30 sec (-w 30) part of the receiver if you need more time to activate the sender
- If you prefer to send/receive a file rather than a directory change the tar pipe to a file redirect
The receiver
$ cat recvnc
# Receives a directory
# Should be run from parent directory
nc -vv -w 30 -p 5600 -l |tar zxv
$
The sender
$ cat sendnc
# $1 is directory to send $2 is other IP
if [ "$#" -ne 2 ] && ! [ -d "$1" ]; then
echo "Usage: $0 directorytoSend otherIP"
exit 1
fi
tar zcv $1 |nc -vv -n -w 2 $2 5600
$
Speed
- I believe you will get the best speed if you plug in the ethernet cable back-to-back between your two machines.
- They will of course need to be given IPs
- …that are different!
Through the router (etc) also works but you can expect the router to be slower than copper!
Wifi will also work and be slower still
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501358%2fhow-shall-i-fast-and-reliably-transfer-300g-files-from-a-computer-to-another%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
On machine receiver.example.com:
cd /destination
socat -u tcp-listen:33333,reuseaddr - | gunzip | pv -trab | bsdtar xpSf -
Then on machine sender.example.com:
cd /source
bsdtar cf - . | pigz -3 | socat -u - tcp:receiver.example.com:33333
Transfer speed will depend on how fast and reliable your WiFi connection is and how compressible your data is (possibly how fast the CPU is if the laptop is really old and the compression ends up being the bottleneck).
You may need to install the bsdtar
, pigz
, socat
and pv
packages.
1
Is it possible to recover/continue if connection is disrupted during transfer?
– sebasth
Feb 18 at 14:50
1
@sebasth, not really, you'd want to resume withrsync
.
– Stéphane Chazelas
Feb 18 at 14:52
2
@sebasth, if the wifi speed ends up being the bottleneck (likely), thenrsync
with the right--compress
options could give you approaching performances.
– Stéphane Chazelas
Feb 18 at 14:54
1
Sometimes it's worth breaking the work up into smaller chunks (instead of transferring all the files in one go, do it in by subdirectory for example) so on failure you don't have to retransmit as much.
– Stephen Harris
Feb 18 at 14:56
add a comment |
On machine receiver.example.com:
cd /destination
socat -u tcp-listen:33333,reuseaddr - | gunzip | pv -trab | bsdtar xpSf -
Then on machine sender.example.com:
cd /source
bsdtar cf - . | pigz -3 | socat -u - tcp:receiver.example.com:33333
Transfer speed will depend on how fast and reliable your WiFi connection is and how compressible your data is (possibly how fast the CPU is if the laptop is really old and the compression ends up being the bottleneck).
You may need to install the bsdtar
, pigz
, socat
and pv
packages.
1
Is it possible to recover/continue if connection is disrupted during transfer?
– sebasth
Feb 18 at 14:50
1
@sebasth, not really, you'd want to resume withrsync
.
– Stéphane Chazelas
Feb 18 at 14:52
2
@sebasth, if the wifi speed ends up being the bottleneck (likely), thenrsync
with the right--compress
options could give you approaching performances.
– Stéphane Chazelas
Feb 18 at 14:54
1
Sometimes it's worth breaking the work up into smaller chunks (instead of transferring all the files in one go, do it in by subdirectory for example) so on failure you don't have to retransmit as much.
– Stephen Harris
Feb 18 at 14:56
add a comment |
On machine receiver.example.com:
cd /destination
socat -u tcp-listen:33333,reuseaddr - | gunzip | pv -trab | bsdtar xpSf -
Then on machine sender.example.com:
cd /source
bsdtar cf - . | pigz -3 | socat -u - tcp:receiver.example.com:33333
Transfer speed will depend on how fast and reliable your WiFi connection is and how compressible your data is (possibly how fast the CPU is if the laptop is really old and the compression ends up being the bottleneck).
You may need to install the bsdtar
, pigz
, socat
and pv
packages.
On machine receiver.example.com:
cd /destination
socat -u tcp-listen:33333,reuseaddr - | gunzip | pv -trab | bsdtar xpSf -
Then on machine sender.example.com:
cd /source
bsdtar cf - . | pigz -3 | socat -u - tcp:receiver.example.com:33333
Transfer speed will depend on how fast and reliable your WiFi connection is and how compressible your data is (possibly how fast the CPU is if the laptop is really old and the compression ends up being the bottleneck).
You may need to install the bsdtar
, pigz
, socat
and pv
packages.
edited Feb 18 at 14:56
answered Feb 18 at 14:47
Stéphane ChazelasStéphane Chazelas
309k57582940
309k57582940
1
Is it possible to recover/continue if connection is disrupted during transfer?
– sebasth
Feb 18 at 14:50
1
@sebasth, not really, you'd want to resume withrsync
.
– Stéphane Chazelas
Feb 18 at 14:52
2
@sebasth, if the wifi speed ends up being the bottleneck (likely), thenrsync
with the right--compress
options could give you approaching performances.
– Stéphane Chazelas
Feb 18 at 14:54
1
Sometimes it's worth breaking the work up into smaller chunks (instead of transferring all the files in one go, do it in by subdirectory for example) so on failure you don't have to retransmit as much.
– Stephen Harris
Feb 18 at 14:56
add a comment |
1
Is it possible to recover/continue if connection is disrupted during transfer?
– sebasth
Feb 18 at 14:50
1
@sebasth, not really, you'd want to resume withrsync
.
– Stéphane Chazelas
Feb 18 at 14:52
2
@sebasth, if the wifi speed ends up being the bottleneck (likely), thenrsync
with the right--compress
options could give you approaching performances.
– Stéphane Chazelas
Feb 18 at 14:54
1
Sometimes it's worth breaking the work up into smaller chunks (instead of transferring all the files in one go, do it in by subdirectory for example) so on failure you don't have to retransmit as much.
– Stephen Harris
Feb 18 at 14:56
1
1
Is it possible to recover/continue if connection is disrupted during transfer?
– sebasth
Feb 18 at 14:50
Is it possible to recover/continue if connection is disrupted during transfer?
– sebasth
Feb 18 at 14:50
1
1
@sebasth, not really, you'd want to resume with
rsync
.– Stéphane Chazelas
Feb 18 at 14:52
@sebasth, not really, you'd want to resume with
rsync
.– Stéphane Chazelas
Feb 18 at 14:52
2
2
@sebasth, if the wifi speed ends up being the bottleneck (likely), then
rsync
with the right --compress
options could give you approaching performances.– Stéphane Chazelas
Feb 18 at 14:54
@sebasth, if the wifi speed ends up being the bottleneck (likely), then
rsync
with the right --compress
options could give you approaching performances.– Stéphane Chazelas
Feb 18 at 14:54
1
1
Sometimes it's worth breaking the work up into smaller chunks (instead of transferring all the files in one go, do it in by subdirectory for example) so on failure you don't have to retransmit as much.
– Stephen Harris
Feb 18 at 14:56
Sometimes it's worth breaking the work up into smaller chunks (instead of transferring all the files in one go, do it in by subdirectory for example) so on failure you don't have to retransmit as much.
– Stephen Harris
Feb 18 at 14:56
add a comment |
rsync
is rather standard tool for transferring files. One advantage of rynsc
is also that it can resume interrupted transfers.
It use ssh
to transfer the data over network:
rsync [OPTION...] SRC... [USER@]HOST:DEST
For example (-a
archive, -z
compress, -v
verbose):
rsync -avz /local/path user@remote:/remote/path
You can also use rsync
for copying to local path (external HDD, NFS mount, etc).
add a comment |
rsync
is rather standard tool for transferring files. One advantage of rynsc
is also that it can resume interrupted transfers.
It use ssh
to transfer the data over network:
rsync [OPTION...] SRC... [USER@]HOST:DEST
For example (-a
archive, -z
compress, -v
verbose):
rsync -avz /local/path user@remote:/remote/path
You can also use rsync
for copying to local path (external HDD, NFS mount, etc).
add a comment |
rsync
is rather standard tool for transferring files. One advantage of rynsc
is also that it can resume interrupted transfers.
It use ssh
to transfer the data over network:
rsync [OPTION...] SRC... [USER@]HOST:DEST
For example (-a
archive, -z
compress, -v
verbose):
rsync -avz /local/path user@remote:/remote/path
You can also use rsync
for copying to local path (external HDD, NFS mount, etc).
rsync
is rather standard tool for transferring files. One advantage of rynsc
is also that it can resume interrupted transfers.
It use ssh
to transfer the data over network:
rsync [OPTION...] SRC... [USER@]HOST:DEST
For example (-a
archive, -z
compress, -v
verbose):
rsync -avz /local/path user@remote:/remote/path
You can also use rsync
for copying to local path (external HDD, NFS mount, etc).
answered Feb 18 at 15:02
sebasthsebasth
8,57632249
8,57632249
add a comment |
add a comment |
1> go to MediaMarkt
2> buy a 500GB USB Hard drive
3> transfer your data onto that HD
4> plug the HD to destination machine
5> transfer data on destination machine
(considering an HDD) USB2 ~25MiB/s, USB3 ~80MiB/s,
ethernet 100Mbps ~12MiB/s, ethernet 1Gbps ~120MiB/s
Thanks. I am not sure how to understand "ethernet 100MBps ~12MiB/s, ethernet 1Gbps ~120MiB/s". Are both for ethernet? Do you mean a range by "100MBps ~12MiB/s"? Are MBps and MiB/s the same unit?
– Tim
Feb 18 at 14:44
No those are not. 1 Mb = megaBIT = 1 000 000 bit, 1 MiB MebiByte = 1024 KiByte = 1 048 576 Byte = 8 388 608 bit, 1 MB = 1 MegaByte = 1000 kByte = 1 000 000 Byte = 8 000 000 bit (1 byte=8bit, M = 10^6, Mi = 2^20)
– DDS
Feb 18 at 14:50
add a comment |
1> go to MediaMarkt
2> buy a 500GB USB Hard drive
3> transfer your data onto that HD
4> plug the HD to destination machine
5> transfer data on destination machine
(considering an HDD) USB2 ~25MiB/s, USB3 ~80MiB/s,
ethernet 100Mbps ~12MiB/s, ethernet 1Gbps ~120MiB/s
Thanks. I am not sure how to understand "ethernet 100MBps ~12MiB/s, ethernet 1Gbps ~120MiB/s". Are both for ethernet? Do you mean a range by "100MBps ~12MiB/s"? Are MBps and MiB/s the same unit?
– Tim
Feb 18 at 14:44
No those are not. 1 Mb = megaBIT = 1 000 000 bit, 1 MiB MebiByte = 1024 KiByte = 1 048 576 Byte = 8 388 608 bit, 1 MB = 1 MegaByte = 1000 kByte = 1 000 000 Byte = 8 000 000 bit (1 byte=8bit, M = 10^6, Mi = 2^20)
– DDS
Feb 18 at 14:50
add a comment |
1> go to MediaMarkt
2> buy a 500GB USB Hard drive
3> transfer your data onto that HD
4> plug the HD to destination machine
5> transfer data on destination machine
(considering an HDD) USB2 ~25MiB/s, USB3 ~80MiB/s,
ethernet 100Mbps ~12MiB/s, ethernet 1Gbps ~120MiB/s
1> go to MediaMarkt
2> buy a 500GB USB Hard drive
3> transfer your data onto that HD
4> plug the HD to destination machine
5> transfer data on destination machine
(considering an HDD) USB2 ~25MiB/s, USB3 ~80MiB/s,
ethernet 100Mbps ~12MiB/s, ethernet 1Gbps ~120MiB/s
edited Feb 18 at 14:46
answered Feb 18 at 14:36
DDSDDS
22910
22910
Thanks. I am not sure how to understand "ethernet 100MBps ~12MiB/s, ethernet 1Gbps ~120MiB/s". Are both for ethernet? Do you mean a range by "100MBps ~12MiB/s"? Are MBps and MiB/s the same unit?
– Tim
Feb 18 at 14:44
No those are not. 1 Mb = megaBIT = 1 000 000 bit, 1 MiB MebiByte = 1024 KiByte = 1 048 576 Byte = 8 388 608 bit, 1 MB = 1 MegaByte = 1000 kByte = 1 000 000 Byte = 8 000 000 bit (1 byte=8bit, M = 10^6, Mi = 2^20)
– DDS
Feb 18 at 14:50
add a comment |
Thanks. I am not sure how to understand "ethernet 100MBps ~12MiB/s, ethernet 1Gbps ~120MiB/s". Are both for ethernet? Do you mean a range by "100MBps ~12MiB/s"? Are MBps and MiB/s the same unit?
– Tim
Feb 18 at 14:44
No those are not. 1 Mb = megaBIT = 1 000 000 bit, 1 MiB MebiByte = 1024 KiByte = 1 048 576 Byte = 8 388 608 bit, 1 MB = 1 MegaByte = 1000 kByte = 1 000 000 Byte = 8 000 000 bit (1 byte=8bit, M = 10^6, Mi = 2^20)
– DDS
Feb 18 at 14:50
Thanks. I am not sure how to understand "ethernet 100MBps ~12MiB/s, ethernet 1Gbps ~120MiB/s". Are both for ethernet? Do you mean a range by "100MBps ~12MiB/s"? Are MBps and MiB/s the same unit?
– Tim
Feb 18 at 14:44
Thanks. I am not sure how to understand "ethernet 100MBps ~12MiB/s, ethernet 1Gbps ~120MiB/s". Are both for ethernet? Do you mean a range by "100MBps ~12MiB/s"? Are MBps and MiB/s the same unit?
– Tim
Feb 18 at 14:44
No those are not. 1 Mb = megaBIT = 1 000 000 bit, 1 MiB MebiByte = 1024 KiByte = 1 048 576 Byte = 8 388 608 bit, 1 MB = 1 MegaByte = 1000 kByte = 1 000 000 Byte = 8 000 000 bit (1 byte=8bit, M = 10^6, Mi = 2^20)
– DDS
Feb 18 at 14:50
No those are not. 1 Mb = megaBIT = 1 000 000 bit, 1 MiB MebiByte = 1024 KiByte = 1 048 576 Byte = 8 388 608 bit, 1 MB = 1 MegaByte = 1000 kByte = 1 000 000 Byte = 8 000 000 bit (1 byte=8bit, M = 10^6, Mi = 2^20)
– DDS
Feb 18 at 14:50
add a comment |
I use these two netcat (nc
) scripts to send/receive a directory tree
- The sender needs to know the receiver IP
- The receiver needs to be run from the parent directory where the received directory will be opened up
- The receiver needs to be started before sender
- Assumed that the two linux (or netcat having) computers are on the same net
- And in walking (or shout-across-the-hallway) distance. Adjust the 30 sec (-w 30) part of the receiver if you need more time to activate the sender
- If you prefer to send/receive a file rather than a directory change the tar pipe to a file redirect
The receiver
$ cat recvnc
# Receives a directory
# Should be run from parent directory
nc -vv -w 30 -p 5600 -l |tar zxv
$
The sender
$ cat sendnc
# $1 is directory to send $2 is other IP
if [ "$#" -ne 2 ] && ! [ -d "$1" ]; then
echo "Usage: $0 directorytoSend otherIP"
exit 1
fi
tar zcv $1 |nc -vv -n -w 2 $2 5600
$
Speed
- I believe you will get the best speed if you plug in the ethernet cable back-to-back between your two machines.
- They will of course need to be given IPs
- …that are different!
Through the router (etc) also works but you can expect the router to be slower than copper!
Wifi will also work and be slower still
add a comment |
I use these two netcat (nc
) scripts to send/receive a directory tree
- The sender needs to know the receiver IP
- The receiver needs to be run from the parent directory where the received directory will be opened up
- The receiver needs to be started before sender
- Assumed that the two linux (or netcat having) computers are on the same net
- And in walking (or shout-across-the-hallway) distance. Adjust the 30 sec (-w 30) part of the receiver if you need more time to activate the sender
- If you prefer to send/receive a file rather than a directory change the tar pipe to a file redirect
The receiver
$ cat recvnc
# Receives a directory
# Should be run from parent directory
nc -vv -w 30 -p 5600 -l |tar zxv
$
The sender
$ cat sendnc
# $1 is directory to send $2 is other IP
if [ "$#" -ne 2 ] && ! [ -d "$1" ]; then
echo "Usage: $0 directorytoSend otherIP"
exit 1
fi
tar zcv $1 |nc -vv -n -w 2 $2 5600
$
Speed
- I believe you will get the best speed if you plug in the ethernet cable back-to-back between your two machines.
- They will of course need to be given IPs
- …that are different!
Through the router (etc) also works but you can expect the router to be slower than copper!
Wifi will also work and be slower still
add a comment |
I use these two netcat (nc
) scripts to send/receive a directory tree
- The sender needs to know the receiver IP
- The receiver needs to be run from the parent directory where the received directory will be opened up
- The receiver needs to be started before sender
- Assumed that the two linux (or netcat having) computers are on the same net
- And in walking (or shout-across-the-hallway) distance. Adjust the 30 sec (-w 30) part of the receiver if you need more time to activate the sender
- If you prefer to send/receive a file rather than a directory change the tar pipe to a file redirect
The receiver
$ cat recvnc
# Receives a directory
# Should be run from parent directory
nc -vv -w 30 -p 5600 -l |tar zxv
$
The sender
$ cat sendnc
# $1 is directory to send $2 is other IP
if [ "$#" -ne 2 ] && ! [ -d "$1" ]; then
echo "Usage: $0 directorytoSend otherIP"
exit 1
fi
tar zcv $1 |nc -vv -n -w 2 $2 5600
$
Speed
- I believe you will get the best speed if you plug in the ethernet cable back-to-back between your two machines.
- They will of course need to be given IPs
- …that are different!
Through the router (etc) also works but you can expect the router to be slower than copper!
Wifi will also work and be slower still
I use these two netcat (nc
) scripts to send/receive a directory tree
- The sender needs to know the receiver IP
- The receiver needs to be run from the parent directory where the received directory will be opened up
- The receiver needs to be started before sender
- Assumed that the two linux (or netcat having) computers are on the same net
- And in walking (or shout-across-the-hallway) distance. Adjust the 30 sec (-w 30) part of the receiver if you need more time to activate the sender
- If you prefer to send/receive a file rather than a directory change the tar pipe to a file redirect
The receiver
$ cat recvnc
# Receives a directory
# Should be run from parent directory
nc -vv -w 30 -p 5600 -l |tar zxv
$
The sender
$ cat sendnc
# $1 is directory to send $2 is other IP
if [ "$#" -ne 2 ] && ! [ -d "$1" ]; then
echo "Usage: $0 directorytoSend otherIP"
exit 1
fi
tar zcv $1 |nc -vv -n -w 2 $2 5600
$
Speed
- I believe you will get the best speed if you plug in the ethernet cable back-to-back between your two machines.
- They will of course need to be given IPs
- …that are different!
Through the router (etc) also works but you can expect the router to be slower than copper!
Wifi will also work and be slower still
edited Feb 18 at 15:22
answered Feb 18 at 15:09
RusiRusi
22916
22916
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501358%2fhow-shall-i-fast-and-reliably-transfer-300g-files-from-a-computer-to-another%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown