Answer the question
In order to leave comments, you need to log in
How to correctly copy files from sftp by mask?
A trivial task is to copy some files from sftp using a mask.
Let's say there is sftp, and it has the following folder structure:
/export/else_parse/2020_12_03_19_00/newfile-2020_12_03_19_00.txt
/export/else_parse/2020_12_02_19_00/newfile-2020_12_02_19_00.txt
/export/else_parse/2020_12_01_19_00/newfile-2020_12_01_19_00.txt
/export/else_parse/2020_12_00_19_00/newfile-2020_12_00_19_00.txt
/export/else_parse/2020_12_00*
. mkdir -p /data/ftp/2020_12_00
cd /data/ftp/2020_12_00
lftp sftp://username:[email protected]:port -e "mget /export/else_parse/2020_12_00*/*; exit"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question