English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Linux rcp command
Linux rcp command is used to copy remote files or directories.
or-Syntax
pr][Source file or directory][Target file or directory]
or-rcp [
pr][Source file or directory...][Target file]Parameters
-:
-p Retain the attributes of the source file or directory, including owner, group, permissions, and time.
Online Examples
Set the local host account to rootlocal and the remote host account to root. To save the remote file to the local, use the rcp command.218.6.132.5If you want to copy the file "testfile" under the main directory to the local directory "test", enter the following command:
rcp [email protected]:./testfile testfile # Copy the remote file to the local rcp [email protected]:home/rootlocal/testfile testfile # The current login account cmd logs in to the remote host rcp 218.6.132.5:./testfile testfile
Note: After executing the instruction "rcp", there will be no return information. You only need to check if the file "testfile" exists in the directory "test". If it exists, it means that the remote copy operation was successful; otherwise, the remote copy operation failed.