25 November 2010

FTP Using a Shell Script

This script allows you to copy/put multiple files from server to client or client to server..

in Terminal login as root user. Follow the procedure.....

ex: my ftp script is named ftp.sh..

# vi ftp.sh

in that file content should be

REMOTE='admingeeks'                                      ! servername or IP address
USER='admin'                                                    ! ftp username
PASSWORD='password'                                   ! ftp password
date >> $FTPLOG
ftp -n $REMOTE <<_FTP>>$FTPLOG
quote USER $USER
cd /u01/backup                                                  ! backup location
mput *.tar

Run via CLI

if any permission error occured change the file permission using chmod command.. ex: chmod 777 ftp.sh

No comments:

Post a Comment