I shall leave the explanations to it and just post my script as example here
DIRS="Documents Desktop"
cd ~
for i in $DIRS;
do
echo Syncing $i
rsync -av --progress -e ssh "$i" user@server:/path/to/dir
done
The Magician Of Linux
DIRS="Documents Desktop"
cd ~
for i in $DIRS;
do
echo Syncing $i
rsync -av --progress -e ssh "$i" user@server:/path/to/dir
done
0 comments:
Post a Comment