Bash pull
| push
script based on Rsync for macOS
/ Linux. With these scripts, you can sync local and remote directories via SSH
connection. Exclude files or directories as a list (string) or as an .ignore
file.
- default local directory is
/Workspace
. - default remote directory is
/www
.
Change the default directories to your specific wish.
- Rsync
- macOS / Linux
If you want to use pull and push globally copy the shell scripts in the user/local/bin/
directory. (macOS)
pull < options > < user@host > < source > < file/directory >
bash pull -e "./.ignore" user@127.0.0.1 ~/Worksapce /www
bash pull -WS -i "file-1.txt","file-2.txt" user@127.0.0.1 / /
bash pull -h
<options>
-i exclude list: \"file-1.txt\",\"file-2.txt\"
-e exclude file: \"./.ignore\" (default: ./.ignore)
-W upload directory starts with: /Workspace
-S source directory starts with: /www
<user@host>
example SSH user name and IPv4 address: user_name@127.0.0.1
<source>
source host source directory: /path/to/directory
<file/directory>
file file path: /path/to/file.ext
directory directory path: /path/to/directory
push < options > < user@host > < file/directory > < destination >
bash push -e "./.ignore" user@127.0.0.1 ~/Worksapce /www
bash push -WD -i "file-1.txt","file-2.txt" user@127.0.0.1 / /
bash push -h
<options>
-i exclude list: \"file-1.txt\",\"file-2.txt\"
-e exclude file: \"./.ignore\" (default: ./.ignore)
-W upload directory starts with: /Workspace
-D destination directory starts with: /www
<user@host>
example SSH user name and IPv4 address: user_name@127.0.0.1
<file/directory>
file file path: /path/to/file.ext
directory directory path: /path/to/directory
<destination>
destination host destination directory: /path/to/directory
Get help via bash pull -h
or bash push -h
.