Methods to copy a file or a folder one linux server to another linux server [on hold]
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
What is the most accurate way to copy a file or a folder from one linux machine to another using commands?
linux file-copy
put on hold as too broad by Romeo Ninov, Jesse_b, RalfFriedl, Thomas Dickey, mosvy yesterday
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
0
down vote
favorite
What is the most accurate way to copy a file or a folder from one linux machine to another using commands?
linux file-copy
put on hold as too broad by Romeo Ninov, Jesse_b, RalfFriedl, Thomas Dickey, mosvy yesterday
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
Possible duplicate of Use scp to transfer a file from local directory X to remote directory Y
– Jesse_b
yesterday
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
What is the most accurate way to copy a file or a folder from one linux machine to another using commands?
linux file-copy
What is the most accurate way to copy a file or a folder from one linux machine to another using commands?
linux file-copy
linux file-copy
edited yesterday
Jeff Schaller
35.9k952119
35.9k952119
asked yesterday
Janith
52
52
put on hold as too broad by Romeo Ninov, Jesse_b, RalfFriedl, Thomas Dickey, mosvy yesterday
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as too broad by Romeo Ninov, Jesse_b, RalfFriedl, Thomas Dickey, mosvy yesterday
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1
Possible duplicate of Use scp to transfer a file from local directory X to remote directory Y
– Jesse_b
yesterday
add a comment |
1
Possible duplicate of Use scp to transfer a file from local directory X to remote directory Y
– Jesse_b
yesterday
1
1
Possible duplicate of Use scp to transfer a file from local directory X to remote directory Y
– Jesse_b
yesterday
Possible duplicate of Use scp to transfer a file from local directory X to remote directory Y
– Jesse_b
yesterday
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
There are various options like ftp
, rsync
etc. but the most useful of these is the scp
which comes preinstalled with openssh
package. Syntax is simple: scp file.txt user@host:/folder/to/which/user/has/permissions
.
There are some other flags, for example, if you are using a different port other than 22
for ssh
, you'd need to mention that in the command with -P
option.
scp -P PORT file.txt user@host:/folder/to/which/user/has/permissions
For directories, it is advised to archive folder(s) in some container (most easy is .tar; tar -cvf myfolder.tar folder1 folder2 folderN
) and then use scp
to send it across to another Linux machine (just replace file.txt
with myfolder.tar
)
add a comment |
up vote
0
down vote
rsync -a
should be as accurate as accuracy can get. -a
stands for the archive mode.
A good description is given in its man
page:
rsync -avz foo:src/bar /data/tmp
This would recursively transfer all files from the directory src/bar on
the machine foo into the /data/tmp/bar directory on the local machine.
The files are transferred in "archive" mode, which ensures that
symbolic links, devices, attributes, permissions, ownerships, etc. are
preserved in the transfer. Additionally, compression will be used to
reduce the size of data portions of the transfer.
The compression flag is -z
and -v
switches verbosity on.
Study the man
page to find out much more.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
There are various options like ftp
, rsync
etc. but the most useful of these is the scp
which comes preinstalled with openssh
package. Syntax is simple: scp file.txt user@host:/folder/to/which/user/has/permissions
.
There are some other flags, for example, if you are using a different port other than 22
for ssh
, you'd need to mention that in the command with -P
option.
scp -P PORT file.txt user@host:/folder/to/which/user/has/permissions
For directories, it is advised to archive folder(s) in some container (most easy is .tar; tar -cvf myfolder.tar folder1 folder2 folderN
) and then use scp
to send it across to another Linux machine (just replace file.txt
with myfolder.tar
)
add a comment |
up vote
0
down vote
accepted
There are various options like ftp
, rsync
etc. but the most useful of these is the scp
which comes preinstalled with openssh
package. Syntax is simple: scp file.txt user@host:/folder/to/which/user/has/permissions
.
There are some other flags, for example, if you are using a different port other than 22
for ssh
, you'd need to mention that in the command with -P
option.
scp -P PORT file.txt user@host:/folder/to/which/user/has/permissions
For directories, it is advised to archive folder(s) in some container (most easy is .tar; tar -cvf myfolder.tar folder1 folder2 folderN
) and then use scp
to send it across to another Linux machine (just replace file.txt
with myfolder.tar
)
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
There are various options like ftp
, rsync
etc. but the most useful of these is the scp
which comes preinstalled with openssh
package. Syntax is simple: scp file.txt user@host:/folder/to/which/user/has/permissions
.
There are some other flags, for example, if you are using a different port other than 22
for ssh
, you'd need to mention that in the command with -P
option.
scp -P PORT file.txt user@host:/folder/to/which/user/has/permissions
For directories, it is advised to archive folder(s) in some container (most easy is .tar; tar -cvf myfolder.tar folder1 folder2 folderN
) and then use scp
to send it across to another Linux machine (just replace file.txt
with myfolder.tar
)
There are various options like ftp
, rsync
etc. but the most useful of these is the scp
which comes preinstalled with openssh
package. Syntax is simple: scp file.txt user@host:/folder/to/which/user/has/permissions
.
There are some other flags, for example, if you are using a different port other than 22
for ssh
, you'd need to mention that in the command with -P
option.
scp -P PORT file.txt user@host:/folder/to/which/user/has/permissions
For directories, it is advised to archive folder(s) in some container (most easy is .tar; tar -cvf myfolder.tar folder1 folder2 folderN
) and then use scp
to send it across to another Linux machine (just replace file.txt
with myfolder.tar
)
edited yesterday
answered yesterday
sla3k
3134
3134
add a comment |
add a comment |
up vote
0
down vote
rsync -a
should be as accurate as accuracy can get. -a
stands for the archive mode.
A good description is given in its man
page:
rsync -avz foo:src/bar /data/tmp
This would recursively transfer all files from the directory src/bar on
the machine foo into the /data/tmp/bar directory on the local machine.
The files are transferred in "archive" mode, which ensures that
symbolic links, devices, attributes, permissions, ownerships, etc. are
preserved in the transfer. Additionally, compression will be used to
reduce the size of data portions of the transfer.
The compression flag is -z
and -v
switches verbosity on.
Study the man
page to find out much more.
add a comment |
up vote
0
down vote
rsync -a
should be as accurate as accuracy can get. -a
stands for the archive mode.
A good description is given in its man
page:
rsync -avz foo:src/bar /data/tmp
This would recursively transfer all files from the directory src/bar on
the machine foo into the /data/tmp/bar directory on the local machine.
The files are transferred in "archive" mode, which ensures that
symbolic links, devices, attributes, permissions, ownerships, etc. are
preserved in the transfer. Additionally, compression will be used to
reduce the size of data portions of the transfer.
The compression flag is -z
and -v
switches verbosity on.
Study the man
page to find out much more.
add a comment |
up vote
0
down vote
up vote
0
down vote
rsync -a
should be as accurate as accuracy can get. -a
stands for the archive mode.
A good description is given in its man
page:
rsync -avz foo:src/bar /data/tmp
This would recursively transfer all files from the directory src/bar on
the machine foo into the /data/tmp/bar directory on the local machine.
The files are transferred in "archive" mode, which ensures that
symbolic links, devices, attributes, permissions, ownerships, etc. are
preserved in the transfer. Additionally, compression will be used to
reduce the size of data portions of the transfer.
The compression flag is -z
and -v
switches verbosity on.
Study the man
page to find out much more.
rsync -a
should be as accurate as accuracy can get. -a
stands for the archive mode.
A good description is given in its man
page:
rsync -avz foo:src/bar /data/tmp
This would recursively transfer all files from the directory src/bar on
the machine foo into the /data/tmp/bar directory on the local machine.
The files are transferred in "archive" mode, which ensures that
symbolic links, devices, attributes, permissions, ownerships, etc. are
preserved in the transfer. Additionally, compression will be used to
reduce the size of data portions of the transfer.
The compression flag is -z
and -v
switches verbosity on.
Study the man
page to find out much more.
edited yesterday
G-Man
12.2k92861
12.2k92861
answered yesterday
Tomasz
8,72552862
8,72552862
add a comment |
add a comment |
1
Possible duplicate of Use scp to transfer a file from local directory X to remote directory Y
– Jesse_b
yesterday