02-16-2009
Script to check file update on ftp server
Hi everybody,
Is there a way to do a stat of files on a ftp server? I have a database which is populated by the contents of these files. I want to setup a crontab to check if there has been an update to these files. If the file has been updated I will download it and then update my database.
I want to know of a way to compare my local files with the files on the server. I don't want to download them and then check since they are quite big.
Thanks in advance,
Dave
-------------------------
Update: wget -N <URL>
seems to do the job.
Last edited by z1dane; 02-17-2009 at 12:55 AM..
Reason: Found a solution
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file --> file1.txt
i need to copy this file to another server using FTP....the 2 servers are server1 and server2..may i know how to write a script that can do this?
thanks in advance! Im a newbie to this... (4 Replies)
Discussion started by: forevercalz
4 Replies
2. Shell Programming and Scripting
Hi
Can any one help me for script. I need a script and this script has to execute daily to move the files.
FTP from one server to another server
EX: Sep 10 06:24 abc.txt
Sep 11 06.56 abc.txt
Sep 12 08.23 abc.txt
these files are located at a/b/c/e/f in 123 server and copy... (0 Replies)
Discussion started by: mahantysk
0 Replies
3. Shell Programming and Scripting
Hi there,
I want to write a linux shellscript that checks a specific folder on a specific FTP-server whether there are new files or not. If there are new files I want to download them to a local directory (to gain access for an local application to these files). The problem is that the files I... (3 Replies)
Discussion started by: monstrous
3 Replies
4. Shell Programming and Scripting
Hello,
I used the search engine but could not find the solution I am looking for. Probably its simple but I do not know the solution.
My requirement is I ftp files every day in the morning from the remote server to the local machine. Now if the files are not there at the time I schedule the ftp... (2 Replies)
Discussion started by: kiran_418
2 Replies
5. Shell Programming and Scripting
i need to write a shell script..
connecting to another server using ftp and check whether the file ter.txt is exists there or not.
i have written scirpt partially,as i new to Unix.
ftp -inv $FTPHOST > $TEMPFILE1 2> $TEMPFILE1 << EOF
user $FTPUSER $FTPPW
binary
prompt
${CD}
ls *.txt... (11 Replies)
Discussion started by: KiranKumarKarre
11 Replies
6. Shell Programming and Scripting
Hello,
I have a script that finds the latest version of a file in a folder on my Minecraft server. I'm trying to come up with something that will then FTP that file over to my fileserver.
Here's what I have that finds the newest file:
find /home/mc/archive/sbhouse -type f -mtime +45 -exec... (7 Replies)
Discussion started by: nbsparks
7 Replies
7. Shell Programming and Scripting
Its a tough one and would appreciate any guidance for a script that i am trying to develop....Again I do understand its a complicated script and help would be greatly appreciated.... Thank you
1- Need to check for a file (in a certain location on a server) every 15 minute or so if it is there... (4 Replies)
Discussion started by: aavam
4 Replies
8. Shell Programming and Scripting
i am connected to the ftp server. how to check the space in that server.
what is the command to check in the below command prompt
ftp>
ftp> (1 Reply)
Discussion started by: ramkumar15
1 Replies
9. Shell Programming and Scripting
HI Guys,
I want to download files from FTP Server to my Unix server.
I have tried , buy No Luck .
Below Command i have tried.
1-Wget - Error "wget' not found"
2.ftp -n $HOST ...Not Working.
3.scp -i ftp://user:passowrd@hostname:21/ran/on/test.txt
Any Suggestion (2 Replies)
Discussion started by: pareshkp
2 Replies
10. Ubuntu
Hello people,
I have to download, with a scheduled script, the latest file from an FTP server.
In the remote DIR, named .../TEKNONET/60468/, every night a CDR file like this gets uploaded into it: 000006046820151122N001.CDR, so my script will have to download every day the previous day... (12 Replies)
Discussion started by: virtus96
12 Replies
LEARN ABOUT FREEBSD
phttpget
PHTTPGET(8) BSD System Manager's Manual PHTTPGET(8)
NAME
phttpget -- retrieve multiple files via pipelined HTTP
SYNOPSIS
phttpget server file ...
DESCRIPTION
The phttpget utility is a minimalist pipelined HTTP client, which is used to retrieve multiple files from one server, and saves the down-
loaded files in the current working directory, using the last portion of their download path as file names.
By making several "in flight" HTTP requests, it can dramatically increase performance when a large number of small files need to be down-
loaded.
The freebsd-update(8) and portnap(8) tools use phttpget to download binary patch files.
ENVIRONMENT
HTTP_PROXY URL of the proxy to use for HTTP requests.
HTTP_PROXY_AUTH Authorization parameters for the HTTP proxy.
HTTP_USER_AGENT The User-Agent string to use for HTTP requests. The default is ``phttpget/0.1''.
HTTP_TIMEOUT Timeout for HTTP request in seconds.
SEE ALSO
fetch(1), freebsd-update(8), portsnap(8)
AUTHORS
The phttpget utility was written by Colin Percival <cperciva@FreeBSD.org> for use with portsnap(8) and later with freebsd-update(8). This
manual page was written by Xin LI <delphij@FreeBSD.org>.
BSD
January 3, 2015 BSD