1844090 Members
2508 Online
110227 Solutions
New Discussion

Re: FTP Issue

 
Jim92900
Occasional Advisor

FTP Issue

I want to get a file from a FTP server but when it gets the file the original time Stamp on the file must not change.

I need this to use it in my script, so that my script will run every two minutes and the FTP would get the file from the system in which the script runs and do some CRC.

Please help on this

Jim
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: FTP Issue

The only way to preserve the time on HP-UX is you must tar the file up. Or you must decode the time and use touch to reset it.
Dennis Handly
Acclaimed Contributor

Re: FTP Issue

Here is a previous thread with a similar question:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1061717
Steven Schweda
Honored Contributor

Re: FTP Issue

Wget attempts to set file date-time according
to the date-time on the FTP server. Its
success depends on some fine print, but it
often works.

http://www.gnu.org/software/wget/wget.html

Accuracy is limited by the resolution in the
server's "DIR" listing (normally "ls -l" for
a UNIX FTP server), which may or may not be
adequate for your needs. You could try it
and see if it does what you need. If the
"ls -l" defects are too great, then packing
the files into an archive ("tar", Zip, ...)
before transfer may be required.