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 username@servername:/path ;
For example: SCP/Users/MAC/Desktop/test. TXT [email protected]:/root /
3. Download the entire directory from the server
Scp-r username@servername:/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 username@servername: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
Read More:
- Ubuntu 20.04 builds nginx 1.18.0 and MAC file transfer / download to server
- Spring MVC realizes page upload file
- Ant Design upload listtype = “picture card” realizes multi image upload and click preview image encapsulation
- Solve the MAC terminal download error curl: (7) failed to connect to raw.githubusercontent.com port 443: Connection refused
- Ng Zorro antd file stream upload, access to upload file path
- Bash modifies the file names in the specified folder through MAC terminal (batch modification)
- Winscp failed to upload the file to the server, indicating permission denied with return code 3
- Local can link to the server database, upload jar package to the server will report an error
- [Solved] Mac Terminal error: command not found: telnet
- Terminal appears after anconda is installed on MAC (base)
- How does a Mac terminal exit the python command line
- Mac running nltk.download () prompt certificate verity failed
- PHP big file upload problem (500m or above)
- GitHub desktop upload file error commit failed – exit code 1 received
- Ajax can’t download file to browser
- Open vs code through terminal using code command in Mac OS
- Error when pychart terminal runs pytest: file not found:
- The Linux terminal appears bash: setup.bash : no such file or directory, and. Bashrc file
- The server just without updating PID file and can’t connect to local MySQL server through socket are solved
- About OSS file download and rename