Here is a sample bash or shell script that will allow you to login in a remote host via FTP and download files automatically by issuing FTP commands .

You can run this script via cron to completely automate the process of collecting files from Unix based systems.

This script comes in handy in case we need to download logs or other files on daily basis
Since, the code is not appearing correctly here, I am attaching both the screen shot and text of the code,
You can copy the text, only problem is in 2nd line, change that according to the screen shot and remove the commented text

FTP download Script

FTP download Script

#!/bin/bash -vx
//Enter below the IP address of system from which you want to download files
ftp -in 192.168.2.34<

Trackback

no comment untill now

Add your comment now