How to SAVE a file from remote server to local machine?
I need to acquire data from a little computer (Red Pitaya-linux) and save it to an external PC because it is very large. Also, I do not want to save the file first and then copy it using ssh for the same reason. Should I insert a ssh into the acquire script?
file-transfer
add a comment |
I need to acquire data from a little computer (Red Pitaya-linux) and save it to an external PC because it is very large. Also, I do not want to save the file first and then copy it using ssh for the same reason. Should I insert a ssh into the acquire script?
file-transfer
1
I guess you would like to mount the drive from the external PC in a directory in the Red Pitaya-linux. Configure NFS sharing. The Red Pitaya-linux will use the shared directory as if it was a local directory.
– Bruno Negrão Zica
Jul 5 '16 at 4:16
add a comment |
I need to acquire data from a little computer (Red Pitaya-linux) and save it to an external PC because it is very large. Also, I do not want to save the file first and then copy it using ssh for the same reason. Should I insert a ssh into the acquire script?
file-transfer
I need to acquire data from a little computer (Red Pitaya-linux) and save it to an external PC because it is very large. Also, I do not want to save the file first and then copy it using ssh for the same reason. Should I insert a ssh into the acquire script?
file-transfer
file-transfer
edited Jul 5 '16 at 3:20
Jeff Schaller♦
44.3k1162143
44.3k1162143
asked Jul 5 '16 at 1:27
Joan MendozaJoan Mendoza
112
112
1
I guess you would like to mount the drive from the external PC in a directory in the Red Pitaya-linux. Configure NFS sharing. The Red Pitaya-linux will use the shared directory as if it was a local directory.
– Bruno Negrão Zica
Jul 5 '16 at 4:16
add a comment |
1
I guess you would like to mount the drive from the external PC in a directory in the Red Pitaya-linux. Configure NFS sharing. The Red Pitaya-linux will use the shared directory as if it was a local directory.
– Bruno Negrão Zica
Jul 5 '16 at 4:16
1
1
I guess you would like to mount the drive from the external PC in a directory in the Red Pitaya-linux. Configure NFS sharing. The Red Pitaya-linux will use the shared directory as if it was a local directory.
– Bruno Negrão Zica
Jul 5 '16 at 4:16
I guess you would like to mount the drive from the external PC in a directory in the Red Pitaya-linux. Configure NFS sharing. The Red Pitaya-linux will use the shared directory as if it was a local directory.
– Bruno Negrão Zica
Jul 5 '16 at 4:16
add a comment |
2 Answers
2
active
oldest
votes
If I understand what you're asking, SFTP (https://www.freebsd.org/cgi/man.cgi?query=sftp&sektion=1) sounds like it would be your best bet to send a file from one server to another. The SCP command might also work, depending on how large the data is. You can use WinSCP, Filezilla, or just run it from the command line (usr/bin/sftp for most installs, but be sure to include IP/hostname:port).
Neithersftp
norscp
will solve the problem that the questioner does "not want to save the file first." Probably you misread the problem.
– Dubu
Jul 5 '16 at 7:44
Exactly, what kind of command would save the .dat into an external disk
– Joan Mendoza
Jul 12 '16 at 17:18
You can either use the sftp prompt/shell or you can create a batch file using the -b flag to run a single command or for scripting. example:/usr/bin/sftp -b ${file} -oPort=${sftp_port} ${sftp_ip}
– SomeGuy
Jul 12 '16 at 18:50
add a comment |
Should I insert a ssh into the acquire script?
Probably yes.
If whatever you run on your little computer to collect data prints to stdout (or can be made to do so), you can just run it with ssh
and redirect stdout on the local machine to a file.
e.g.
ssh user@redpitaya 'data-gathering-script-or-command' > localfile
If the output is huge, and/or you connect to it via an expensive network connection, you can save time (and maybe money) by compressing stdout on the little machine.
e.g.
ssh user@redpitaya 'data-gathering-script-or-command | gzip' > localfile.gz
or
ssh user@redpitaya 'data-gathering-script-or-command | gzip' |
gzip -d > localfile
Alternatively, you can use xz
or lzma
or any other compression tool instead of gzip
.
NOTE: You're using CPU time on the little machine to minimise network traffic. Be careful not to overload the little box if it has a tiny, under-powered CPU.
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%2f293906%2fhow-to-save-a-file-from-remote-server-to-local-machine%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If I understand what you're asking, SFTP (https://www.freebsd.org/cgi/man.cgi?query=sftp&sektion=1) sounds like it would be your best bet to send a file from one server to another. The SCP command might also work, depending on how large the data is. You can use WinSCP, Filezilla, or just run it from the command line (usr/bin/sftp for most installs, but be sure to include IP/hostname:port).
Neithersftp
norscp
will solve the problem that the questioner does "not want to save the file first." Probably you misread the problem.
– Dubu
Jul 5 '16 at 7:44
Exactly, what kind of command would save the .dat into an external disk
– Joan Mendoza
Jul 12 '16 at 17:18
You can either use the sftp prompt/shell or you can create a batch file using the -b flag to run a single command or for scripting. example:/usr/bin/sftp -b ${file} -oPort=${sftp_port} ${sftp_ip}
– SomeGuy
Jul 12 '16 at 18:50
add a comment |
If I understand what you're asking, SFTP (https://www.freebsd.org/cgi/man.cgi?query=sftp&sektion=1) sounds like it would be your best bet to send a file from one server to another. The SCP command might also work, depending on how large the data is. You can use WinSCP, Filezilla, or just run it from the command line (usr/bin/sftp for most installs, but be sure to include IP/hostname:port).
Neithersftp
norscp
will solve the problem that the questioner does "not want to save the file first." Probably you misread the problem.
– Dubu
Jul 5 '16 at 7:44
Exactly, what kind of command would save the .dat into an external disk
– Joan Mendoza
Jul 12 '16 at 17:18
You can either use the sftp prompt/shell or you can create a batch file using the -b flag to run a single command or for scripting. example:/usr/bin/sftp -b ${file} -oPort=${sftp_port} ${sftp_ip}
– SomeGuy
Jul 12 '16 at 18:50
add a comment |
If I understand what you're asking, SFTP (https://www.freebsd.org/cgi/man.cgi?query=sftp&sektion=1) sounds like it would be your best bet to send a file from one server to another. The SCP command might also work, depending on how large the data is. You can use WinSCP, Filezilla, or just run it from the command line (usr/bin/sftp for most installs, but be sure to include IP/hostname:port).
If I understand what you're asking, SFTP (https://www.freebsd.org/cgi/man.cgi?query=sftp&sektion=1) sounds like it would be your best bet to send a file from one server to another. The SCP command might also work, depending on how large the data is. You can use WinSCP, Filezilla, or just run it from the command line (usr/bin/sftp for most installs, but be sure to include IP/hostname:port).
answered Jul 5 '16 at 2:26
SomeGuySomeGuy
232112
232112
Neithersftp
norscp
will solve the problem that the questioner does "not want to save the file first." Probably you misread the problem.
– Dubu
Jul 5 '16 at 7:44
Exactly, what kind of command would save the .dat into an external disk
– Joan Mendoza
Jul 12 '16 at 17:18
You can either use the sftp prompt/shell or you can create a batch file using the -b flag to run a single command or for scripting. example:/usr/bin/sftp -b ${file} -oPort=${sftp_port} ${sftp_ip}
– SomeGuy
Jul 12 '16 at 18:50
add a comment |
Neithersftp
norscp
will solve the problem that the questioner does "not want to save the file first." Probably you misread the problem.
– Dubu
Jul 5 '16 at 7:44
Exactly, what kind of command would save the .dat into an external disk
– Joan Mendoza
Jul 12 '16 at 17:18
You can either use the sftp prompt/shell or you can create a batch file using the -b flag to run a single command or for scripting. example:/usr/bin/sftp -b ${file} -oPort=${sftp_port} ${sftp_ip}
– SomeGuy
Jul 12 '16 at 18:50
Neither
sftp
nor scp
will solve the problem that the questioner does "not want to save the file first." Probably you misread the problem.– Dubu
Jul 5 '16 at 7:44
Neither
sftp
nor scp
will solve the problem that the questioner does "not want to save the file first." Probably you misread the problem.– Dubu
Jul 5 '16 at 7:44
Exactly, what kind of command would save the .dat into an external disk
– Joan Mendoza
Jul 12 '16 at 17:18
Exactly, what kind of command would save the .dat into an external disk
– Joan Mendoza
Jul 12 '16 at 17:18
You can either use the sftp prompt/shell or you can create a batch file using the -b flag to run a single command or for scripting. example:
/usr/bin/sftp -b ${file} -oPort=${sftp_port} ${sftp_ip}
– SomeGuy
Jul 12 '16 at 18:50
You can either use the sftp prompt/shell or you can create a batch file using the -b flag to run a single command or for scripting. example:
/usr/bin/sftp -b ${file} -oPort=${sftp_port} ${sftp_ip}
– SomeGuy
Jul 12 '16 at 18:50
add a comment |
Should I insert a ssh into the acquire script?
Probably yes.
If whatever you run on your little computer to collect data prints to stdout (or can be made to do so), you can just run it with ssh
and redirect stdout on the local machine to a file.
e.g.
ssh user@redpitaya 'data-gathering-script-or-command' > localfile
If the output is huge, and/or you connect to it via an expensive network connection, you can save time (and maybe money) by compressing stdout on the little machine.
e.g.
ssh user@redpitaya 'data-gathering-script-or-command | gzip' > localfile.gz
or
ssh user@redpitaya 'data-gathering-script-or-command | gzip' |
gzip -d > localfile
Alternatively, you can use xz
or lzma
or any other compression tool instead of gzip
.
NOTE: You're using CPU time on the little machine to minimise network traffic. Be careful not to overload the little box if it has a tiny, under-powered CPU.
add a comment |
Should I insert a ssh into the acquire script?
Probably yes.
If whatever you run on your little computer to collect data prints to stdout (or can be made to do so), you can just run it with ssh
and redirect stdout on the local machine to a file.
e.g.
ssh user@redpitaya 'data-gathering-script-or-command' > localfile
If the output is huge, and/or you connect to it via an expensive network connection, you can save time (and maybe money) by compressing stdout on the little machine.
e.g.
ssh user@redpitaya 'data-gathering-script-or-command | gzip' > localfile.gz
or
ssh user@redpitaya 'data-gathering-script-or-command | gzip' |
gzip -d > localfile
Alternatively, you can use xz
or lzma
or any other compression tool instead of gzip
.
NOTE: You're using CPU time on the little machine to minimise network traffic. Be careful not to overload the little box if it has a tiny, under-powered CPU.
add a comment |
Should I insert a ssh into the acquire script?
Probably yes.
If whatever you run on your little computer to collect data prints to stdout (or can be made to do so), you can just run it with ssh
and redirect stdout on the local machine to a file.
e.g.
ssh user@redpitaya 'data-gathering-script-or-command' > localfile
If the output is huge, and/or you connect to it via an expensive network connection, you can save time (and maybe money) by compressing stdout on the little machine.
e.g.
ssh user@redpitaya 'data-gathering-script-or-command | gzip' > localfile.gz
or
ssh user@redpitaya 'data-gathering-script-or-command | gzip' |
gzip -d > localfile
Alternatively, you can use xz
or lzma
or any other compression tool instead of gzip
.
NOTE: You're using CPU time on the little machine to minimise network traffic. Be careful not to overload the little box if it has a tiny, under-powered CPU.
Should I insert a ssh into the acquire script?
Probably yes.
If whatever you run on your little computer to collect data prints to stdout (or can be made to do so), you can just run it with ssh
and redirect stdout on the local machine to a file.
e.g.
ssh user@redpitaya 'data-gathering-script-or-command' > localfile
If the output is huge, and/or you connect to it via an expensive network connection, you can save time (and maybe money) by compressing stdout on the little machine.
e.g.
ssh user@redpitaya 'data-gathering-script-or-command | gzip' > localfile.gz
or
ssh user@redpitaya 'data-gathering-script-or-command | gzip' |
gzip -d > localfile
Alternatively, you can use xz
or lzma
or any other compression tool instead of gzip
.
NOTE: You're using CPU time on the little machine to minimise network traffic. Be careful not to overload the little box if it has a tiny, under-powered CPU.
edited Jul 5 '16 at 6:04
answered Jul 5 '16 at 5:53
cascas
39.5k455103
39.5k455103
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%2f293906%2fhow-to-save-a-file-from-remote-server-to-local-machine%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
1
I guess you would like to mount the drive from the external PC in a directory in the Red Pitaya-linux. Configure NFS sharing. The Red Pitaya-linux will use the shared directory as if it was a local directory.
– Bruno Negrão Zica
Jul 5 '16 at 4:16