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
#!/bin/bash -vx
//Enter below the IP address of system from which you want to download files
ftp -in 192.168.2.34<quote USER testuser //your username
quote PASS abcc#123 // your password
bin
prompt off
cd /home/testuser //change to directory from which you want to copy
lcd /tmp
get testfile.dat
bye
END_SCRIPT
Related posts:
- Search and replace text in all files in Sub directories if you want to Search for a particular string or...
- How to run a FTP script in Windows? Not only Windows has a built-in command line FTP utility...
- Using Gmail SMTP from Perl Script Gmail does not allow unsecured connections to its SMTP server,...
- Command to Extract .tar.bz2 files .tar.bz2 Are files that have been bzipped using the...
- Count number of files in a directory If a directory has a large number of files on...
- Can you browse Vista files from XP ? I had installed vista on my computer which has xp...
no comment untill now