Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh上传本地文件至服务器以及解压文件等 #24

Open
zemise opened this issue Jun 28, 2023 · 0 comments
Open

ssh上传本地文件至服务器以及解压文件等 #24

zemise opened this issue Jun 28, 2023 · 0 comments
Labels

Comments

@zemise
Copy link
Owner

zemise commented Jun 28, 2023

1. 前言

偶尔需要上传本地文件至服务器,而在服务器需要解压一些压缩文件,故简单记录。

2. SSH上传本地文件

  • 使用以下命令将本地文件上传到服务器:(将 local_file_path 替换为本地文件的路径,remote_file_path 替换为服务器上目标位置的路径)
scp local_file_path username@server_ip:remote_file_path

注意:如果使用的是 Windows ,注意是反斜杠

scp local_file_path username@server_ip:/remote_file_path

3. Ubuntu中解压相关

3.1 zip文件

sudo apt-get install unzip

unzip 文件名.zip

unzip 文件名.zip -d 目标目录

3.2 rar文件

sudo apt-get install unrar

unrar x 文件名.rar
@zemise zemise added the linux label Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant