-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7cf39d
commit 1773c63
Showing
5 changed files
with
54 additions
and
256 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,4 @@ | ||
import DefaultTheme from 'vitepress/theme'; | ||
import CollapsibleSidebar from '../components/CollapsibleSidebar.vue'; | ||
|
||
export default { | ||
...DefaultTheme, | ||
enhanceApp({ app }) { | ||
// 注册折叠侧边栏组件 | ||
app.component('CollapsibleSidebar', CollapsibleSidebar); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# rsync | ||
rsync 是另一个常用的文件同步工具,它比 scp 更高效,支持增量传输、压缩等功能,适合传输大文件或大量文件。 | ||
|
||
从本地传输文件到远程: | ||
bash | ||
复制代码 | ||
rsync -avz /path/to/local/file username@remote_host:/path/to/remote/directory | ||
从远程传输文件到本地: | ||
bash | ||
复制代码 | ||
rsync -avz username@remote_host:/path/to/remote/file /path/to/local/directory | ||
其中: | ||
|
||
-a:归档模式,保留符号链接、文件权限等。 | ||
-v:详细模式,输出更多信息。 | ||
-z:压缩传输。 | ||
同步整个目录: | ||
bash | ||
复制代码 | ||
rsync -avz /path/to/local/directory username@remote_host:/path/to/remote/directory | ||
|
||
|
||
# scp | ||
|
||
1. scp(Secure Copy Protocol) | ||
scp 是一种通过SSH协议在本地和远程计算机之间复制文件的工具,支持文件夹的传输。 | ||
|
||
从本地传输文件到远程服务器: | ||
bash | ||
复制代码 | ||
scp /path/to/local/file username@remote_host:/path/to/remote/directory | ||
例如,将本地文件 file.txt 传输到远程服务器的 /home/user/ 目录: | ||
|
||
bash | ||
复制代码 | ||
scp file.txt [email protected]:/home/user/ | ||
从远程服务器传输文件到本地: | ||
bash | ||
复制代码 | ||
scp username@remote_host:/path/to/remote/file /path/to/local/directory | ||
例如,从远程服务器下载 file.txt 到本地: | ||
|
||
bash | ||
复制代码 | ||
scp [email protected]:/home/user/file.txt /home/localuser/ | ||
传输整个目录: | ||
使用 -r 参数递归传输目录。 | ||
|
||
bash | ||
复制代码 | ||
scp -r /path/to/local/directory username@remote_host:/path/to/remote/directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[ | ||
"docs/os/linux/utils/rsync.md", | ||
"docs/database/mysql/other.md", | ||
"docs/java/framework/springmvc/index.md", | ||
"docs/java/devTools/buildTools/gradle/index.md", | ||
"docs/java/devTools/buildTools/maven/index.md", | ||
"docs/java/devTools/index.md", | ||
"docs/java/framework/jpa/index.md", | ||
"docs/java/utils/lombok/import.md", | ||
"docs/java/utils/lombok/index.md", | ||
"docs/java/devTools/buildTools/maven/basic.md", | ||
"docs/java/devTools/buildTools/maven/install.md", | ||
"docs/os/linux/chmod.md" | ||
"docs/java/devTools/buildTools/maven/basic.md" | ||
] |