The Mac comes with SSH, as explained in the last post.
This article mainly introduces the use of SCP command to achieve the file upload and download
1. Download files from the server
SCP username @ servername:/path/filename/Users/MAC/Desktop (local directory)
For example: SCP [email protected]:/root/test. TXT/Users/MAC/Desktop
Download /root/test.txt from the server to the local /Users/ MAC /Desktop directory.
Notice the space between the two addresses!
2. Upload files locally to the server
scp /path/filename [email protected]:/path ;
For example: SCP/Users/MAC/Desktop/test. TXT [email protected]:/root /
3. Download the entire directory from the server
Scp-r [email protected]:/root/ (remote directory) /Users/ MAC /Desktop (local directory)
For example: scp-r [email protected]:/root/ /Users/ MAC /Desktop/
4. Upload the directory to the server
scp -r local_dir [email protected]:remote_dir
For example, scp-r test [email protected]:/root/ Upload the test directory in the current directory to the server’s /root/ directory
5. Finally, it introduces a software that can also easily realize the file interaction between local and server. FinalShell
- Ubuntu 20.04 builds nginx 1.18.0 and MAC file transfer / download to server
- xrdp_mm_process_login_response:login failed
- Linux remote copy command and not a regular file solution
- Linux Tomcat accessing files on the server
- Error code 2: Access violation error.
- Remote desktop 0x104 solution?
- Winscp failed to upload the file to the server, indicating permission denied with return code 3
- How to solve the problem of creating notebook failed
- Export and import method of MySQL under Linux
- Linux shell gets the file name under the folder
- GitHub desktop upload file error commit failed – exit code 1 received
- FTP use get command 550 failed to open file, but use the put command to solve the problem
- Java – read all the files and folders in a certain directory and three methods to get the file name from the file path
- TFTP: server says: file not found solution
- Solve syntax error: unexpected end of file or /bin/bash^m: bad interpeneter: no match file or directory
- You are not allowed to upload merges in Git push
- “Failed to find entry for user…” appears when Linux uses samba
- A solution to the refusal of rdesktop connection to windows host
- Error: SRC refspec master does not match any. error: failed to push some refs to
- mac Upgrade: httpd: apr_sockaddr_info_get() failed for bogon