Answer the question
In order to leave comments, you need to log in
bash. How to send files over SSH from res-ta variable?
Hi all!
I'm just getting started with making my own bash scripts.
Tell me how to best implement the task of transferring the found files by creation date to another server via ssh
Local backup daily, source files with a unique name backup1-DD.MM.YY.tar.gz
In this form, it occurred to me.
#!/bin/sh
### поиск ###
FFILES=$(find /backup -type f -mtime -1)
### создание временной папки и копирование туда найденных файлов###
### передача ###
rsync -avz -e "ssh -p 2222" $temp_dir [email protected]:/home/backup/
### удаление временной папки ###
Answer the question
In order to leave comments, you need to log in
as an option, you can transfer via wput is put from the repo and you can limit the transfer rate.
how else the variant is banal
find has -exec
like {} array output, the
only thing you need to look at is special characters, but it seems something like this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question