Sponsored Content
Top Forums Shell Programming and Scripting Automated script to look for files in FTP Server location. Post 302548444 by jville on Thursday 18th of August 2011 11:44:39 AM
Old 08-18-2011
you can put this script in cron for automation

Code:
ftp -v -n $FTP_SERVER << EOF | tee $LOGFILE
user $FUSER $FPASS
cd $FILE_LOCATION
dir $FILE_TO_BE_FTPD
quit
EOF
   
grep $FILE_TO_BE_FTPD $LOGFILE
if [ $? -eq 0 ]
 then
  echo "FOUND FILE"
ftp -v -n $FTP_SERVER 
user $FUSER $FPASS
cd $FILE_LOCATION
get $FILE_TO_BE_FTPD
quit
EOF
else
     echo "File not found "
fi

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

automated ftp script from unix -date range of files

Hi , I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated. Thanks, Ravi :) (1 Reply)
Discussion started by: koduri0475
1 Replies

2. Programming

automated ftp script from unix -date range of files

Hi , I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated. Thanks, Ravi :) (1 Reply)
Discussion started by: koduri0475
1 Replies

3. UNIX for Advanced & Expert Users

automated ftp script from unix -date range of files

Hi , I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated. Thanks, Ravi :) (1 Reply)
Discussion started by: koduri0475
1 Replies

4. IP Networking

Automated ftp for Multiple files

I have seen the script posted yesterday for automated ftp Can we do some thing like ftp ing multiple files in one script Example input.txt has all files names to be ftped input.txt ------ a.tar b.ccp c.perl i need to ftp all the files present in input.txt i tried something like... (0 Replies)
Discussion started by: pbsrinivas
0 Replies

5. Shell Programming and Scripting

Automated FTP from Unix to Active Directory Server

Automated Unix to Windows Active Directory FTP I have done many automated FTP scripts using the following logic: =============================== echo "Starting the FTP transfer..." { echo " open 192.168.1.100 user username password ascii put... (1 Reply)
Discussion started by: Cbish68
1 Replies

6. Shell Programming and Scripting

Help needed with automated FTP script

Hi, Ok, i'm trying to automate sending a DB backup from a linux box to a remote Windows PC via FTP. I can connect, send the file and create a folder, however I require that the backups be differentiated by date. Here is what my script looks like: open *.*.*.* user username password lcd... (4 Replies)
Discussion started by: leimrod
4 Replies

7. Shell Programming and Scripting

Automated FTP script using .netrc to multiple FTP servers

Hi all, I'm using the following script to automated ftp files to 1 ftp servers host=192.168.0.1 /usr/bin/ftp -vi >> $bkplog 2>&1 <<ftp open $host bin cd ${directory} put $files quit ftp and the .netrc file contain machine 192.168.0.1 login abc... (4 Replies)
Discussion started by: varu0612
4 Replies

8. Shell Programming and Scripting

Shell Script for Copy files from one location to another location

Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Discussion started by: allways4u21
2 Replies

9. Shell Programming and Scripting

script for to take files from FTP server to UNIX server and Unzipped that files

script for to take files from FTP server to UNIX server and Unzipped that files (1 Reply)
Discussion started by: sunilamarnadh
1 Replies

10. Shell Programming and Scripting

Deleting local server file from automated FTP script

Hi, I want to delete a file on the local server, while connected to remote server through FTP. I am using the below code for this $FTP_CMD -v -n $HOST <<*! >> $LOGFILE 2>&1 user $USER $PASSWORD cd $DIR ... (11 Replies)
Discussion started by: jhilmil
11 Replies
BIHOURLY(8)						      System Manager's Manual						       BIHOURLY(8)

NAME
bihourly - track ethernet/ip address pairs SYNOPSIS
bihourly DESCRIPTION
bihourly is a script that automates the operation of arpsnmp(8) by executing arpfetch(8) on a series of hostnames and then sending the results to arpsnmp(8) for analysis. The result is a report of the current pairings between ip addresses and the corresponding ethernet address of the network hardware as reported by snmpwalk(8). Activity is logged and noted changes are reported by email. In its working directory bihourly expects a file named list which contains a space separated list of hostnames to be queried and a file named cname which holds the SNMP community name by which to query these hosts. Contrary to the name, bihourly does not run twice every hour. It runs once each time it is invoked. For repeated operation bihourly must be invoked on a periodic basis by a program like cron(1). FILES
/var/lib/arpwatch - default working directory list - file containing names of hosts to query cname - file containing the SNMP community name by which to query SEE ALSO
arpsnmp(8), arpfetch(8), snmpwalk(8), cron(8) BUGS
Please send bug reports to arpwatch@ee.lbl.gov. AUTHORS
Craig Leres of the Lawrence Berkeley National Laboratory Network Research Group, University of California, Berkeley, CA. The current version is available via anonymous ftp: ftp://ftp.ee.lbl.gov/arpwatch.tar.gz This manual page was contributed by Hugo Graumann. BIHOURLY(8)
All times are GMT -4. The time now is 04:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy