From 1cae3836785a0bbd4cd3056c6b2a94c8c63f6f93 Mon Sep 17 00:00:00 2001 From: Mauro Scomparin Date: Sun, 6 Sep 2020 16:48:35 +0200 Subject: [PATCH] scripts for phone --- tel/download | 14 ++++++++++++++ tel/upload | 15 +++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 tel/download create mode 100755 tel/upload diff --git a/tel/download b/tel/download new file mode 100755 index 0000000..22f7971 --- /dev/null +++ b/tel/download @@ -0,0 +1,14 @@ +#!/bin/sh +# Download a folder from a remote server with rsync using ssh + +. ~/.bashrc + +SERVER=server1.scompo.it +SSH_USER=scompo + +LOCAL_FOLDER=$HOME +REMOTE_FOLDER=~/personal/files + +rsync -rzhvae ssh --progress "$SSH_USER@$SERVER:$REMOTE_FOLDER" "$LOCAL_FOLDER" + +read -p "Press any key to continue" ooo diff --git a/tel/upload b/tel/upload new file mode 100755 index 0000000..f8bcba6 --- /dev/null +++ b/tel/upload @@ -0,0 +1,15 @@ +#!/bin/sh +# Upload a directory to a server using rsync via ssh + +. ~/.bashrc + +SERVER=server1.scompo.it +SSH_USER=scompo + +LOCAL_FOLDER=$HOME/files +REMOTE_FOLDER=~/personal + +rsync -rzhvae ssh --progress "$LOCAL_FOLDER" "$SSH_USER@$SERVER:$REMOTE_FOLDER" + +read -p "Press any key to continue" ooo + -- 2.25.1