下面的命令在远程机器中提取指定的文件:
tar -xzOf file.tar.gz file_you_want_to_extract | ssh user@host 'cat > /path/to/destination_file'
Run Code Online (Sandbox Code Playgroud)
我的要求是我想将所有文件提取到远程机器中。我怎样才能做到这一点?
tar -xzOf file.tar.gz | ssh user@host 'cat > /path_dir'
Run Code Online (Sandbox Code Playgroud)
file.tar.gz 中的所有文件都应该解压到远程主机的 /path_dir 中。
| 归档时间: |
|
| 查看次数: |
7810 次 |
| 最近记录: |