Wednesday, November 2, 2011

How to perform an FTP transaction using Bash scripting in Linux

If you want to automate an FTP operation then you can easily use Bash scripting for that.


For example, following script gets file file.txt from ftp server


ftp -ivn ftp.internet.com<<FTP_COMMANDS
        user <username> <password>
        type binary
        cd /
        lcd /home/<username>
        get file.txt
        quit
FTP_COMMANDS

No comments:

Post a Comment