Skip to content

Instantly share code, notes, and snippets.

@arkenidar
Created March 23, 2024 15:22
Show Gist options
  • Save arkenidar/a682463b9fbef04f5eab6120a456da36 to your computer and use it in GitHub Desktop.
Save arkenidar/a682463b9fbef04f5eab6120a456da36 to your computer and use it in GitHub Desktop.
sync task (from local workspace to remote filesystem). note: vice-versa is possible also (invert order of source and destination arguments and tweak them accordingly).
## add the following line ...
# source "$HOME/sync_task.bash"
## ... to "$HOME/.bashrc" (BASH initialization hidden file)
function sync_task(){
# note: vice-versa is possible also (invert order of source and destination arguments and tweak them accordingly).
rsync -zarv --delete /c/0/Dropbox/desktop root@synbox.freeddns.org:/root && printf "\n\n *rsync-complete* \n\n"
printf "\n\n hint: type 'sync_task' to do it again \n\n"
}
printf " \n 'sync_task' bash function definition added. you can use it. \n "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment