Files
be.ems/tools/misc/rsyncsmb.sh
2023-08-14 21:41:37 +08:00

10 lines
301 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 源目录Windows目录
SRC_DIR="192.168.2.119:/goprojects"
# 目标目录Samba目录
DST_DIR="/home/simon/goprojects"
# 同步目录
#rsync -avz --delete "$SRC_DIR/" "$DST_DIR/"
rsync -avz --delete --user=myuser --password-file=/path/to/password.txt "$SRC_DIR/" "$DST_DIR/"