YouTip LogoYouTip

Linux Comm Rcp

# Linux rcp Command [![Image 3: Linux Command Manual](#) Linux Command Manual](#) The Linux rcp command is used to copy remote files or directories. The rcp command is used to copy files or directories remotely. If more than one file or directory is specified and the final destination is an existing directory, it will copy all the specified files or directories into that directory. ### Syntax rcp or rcp [source file or directory...] **Parameters**: -p Preserves the attributes of the source file or directory, including owner, group, permissions, and time. -r Recursively processes, handling files and subdirectories under the specified directory. ### Example Use the rcp command to copy a remote file to the local machine for saving. Assume the local host's current account is rootlocal, the remote host's account is root. To copy the file "testfile" from the remote host's (218.6.132.5) home directory to the local directory "test", enter the following command: rcp root@218.6.132.5:./testfile testfile #Copy remote file to local rcp root@218.6.132.5:home/rootlocal/testfile testfile #Requires the current logged-in account cmd to log in to the remote host rcp 218.6.132.5:./testfile testfile Note: The "rcp" command does not return any information after execution. You only need to check if the file "testfile" exists in the "test" directory. If it exists, the remote copy operation was successful; otherwise, the remote copy operation failed. [![Image 4: Linux Command Manual](#) Linux Command Manual](#)
← Linux Comm RmLinux Comm Patch β†’