mirror of
https://github.com/muerwre/muerwre.github.io.git
synced 2025-04-25 02:46:39 +07:00
added whole content
This commit is contained in:
parent
1b5df685cb
commit
8b25e0631a
70 changed files with 5962 additions and 19 deletions
16
content/Linux/Rsync file with SSH.md
Normal file
16
content/Linux/Rsync file with SSH.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
Downloads file from #SSH with rsync and puts it in current folder.
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
PORT=22
|
||||
USER=user
|
||||
HOST=example.com
|
||||
REMOTE_PATH=/tmp
|
||||
REMOTE_FILE=sample.text
|
||||
DEST_PATH=./
|
||||
|
||||
rsync -a -e "ssh -p $PORT" -P -v \
|
||||
"$USER@$HOST:$REMOTE_PATH/$REMOTE_FILE" \
|
||||
"$DEST_PATH"
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue