Home >Operation and Maintenance >Linux Operation and Maintenance >linux scp command usage
Linux scp command
scp is the abbreviation of secure copy. scp is a secure remote file copy command based on ssh login under the Linux system. It is an enhanced version of the cp command.
Basic usage(Recommended learning: Linux video tutorial)
scp [optional parameters] source File/directory target file/directory
Commonly used optional parameters
-P Uppercase, specify the port number
-r Recursively copy the entire directory
-v Display all debug information
-q Do not display transfer progress
-C Uppercase, enable compression
-4 Use IPv4 address
-6 Use IPv6 address
Copy locally to remote
scp -r local_folder remote_username@remote_ip:remote_folder
or
scp -r local_folder remote_ip:remote_folder
The first one specifies the user name, and the command is executed You need to enter the password again;
The second one does not specify a user name, and you need to enter the user name and password after the command is executed;
For more Linux-related technical articles, please visit Linux Operation and Maintenance Learn in the tutorial column!
The above is the detailed content of linux scp command usage. For more information, please follow other related articles on the PHP Chinese website!