1834817 Members
2567 Online
110070 Solutions
New Discussion

Re: FTP Date

 
SOLVED
Go to solution
Raj Mithal_1
Advisor

FTP Date

Hi,
How do I change the FTP date to match the server date?

hcp1 / #
hcp1 / # ftp hcp2
Connected to hcp2.
220 hcp2 FTP server (Version 1.1.214.4(PHNE_30990) Mon Nov 15 12:47:12 GMT 2004) ready.
Name (hcp2:root):
331 Password required for root.
Password:
530 Login incorrect.
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bye
221 Goodbye.
hcp1 / # date
Fri Feb 24 11:12:53 SAST 2006
hcp1 / #
13 REPLIES 13
Muthukumar_5
Honored Contributor

Re: FTP Date

You have to set your machine date information as like FTP server date. OR do vice versa. Hope you can not change remote machine time. To change local machine date informations from ftp then,

ftp>!
#

--
Muthu
Easy to suggest when don't know about the problem!
Stephen Keane
Honored Contributor
Solution

Re: FTP Date

If by the FTP date you mean the "Mon Nov 15 12:47:12" value, that's the patch level date and would only be changed if you applied a new patch to the FTP executable. It isn't the current date/time.
Yogeeraj_1
Honored Contributor

Re: FTP Date

hi,

Connected to MYSVR.
220 MYSVR.MU FTP server (Version 1.1.214.4(PHNE_30432) Thu Feb 26 10:46:14 GM
T 2004) ready.
User (MYSVR:(none)):


Like on mine is also different. The date you are seeing is the date the patch PHNE_30432 (or PHNE_30990) was released.

nothing to worry about!

hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Raj Mithal_1
Advisor

Re: FTP Date

YES! Thank you. I just noticed the patch num. This date displays in a rolling log and it confused the user.

I will change the script to generate a new log every day to solve his problem.
Muthukumar_5
Honored Contributor

Re: FTP Date

oops. you are saying about this - (PHNE_30990) Mon Nov 15 12:47:12 ??

You avoid this as,

ftp -in <<-EOF
user
commands to be executed
bye
EOF

will remove unneeded index messages.

--
Muthu
Easy to suggest when don't know about the problem!
Raj Mithal_1
Advisor

Re: FTP Date

It doesnt work:-

hcp1 / #
hcp1 / # ftp -in hcp2
Connected to hcp2.
220 hcp2 FTP server (Version 1.1.214.4(PHNE_30990) Mon Nov 15 12:47:12 GMT 2004) ready.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
Yogeeraj_1
Honored Contributor

Re: FTP Date

hi,
should be -i -n

e.g.

ftp -i -n hcp2 <<-EOF
user root root
ls
bye
EOF



hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Raj Mithal_1
Advisor

Re: FTP Date

still not working but don't worry the problem is solved:-



hcp1 / #
hcp1 / # ftp -i -n hcp2
Connected to hcp2.
220 hcp2 FTP server (Version 1.1.214.4(PHNE_30990) Mon Nov 15 12:47:12 GMT 2004) ready.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
Yogeeraj_1
Honored Contributor

Re: FTP Date

hi raj,

it WILL work if you type all the texts as written below:

ftp -i -n hcp2 <<-EOF
user
ls
bye
EOF



###
NB. replace and accordiningly.

we don't see "<< - EOF .." etc

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Raj Mithal_1
Advisor

Re: FTP Date

The FTP is executed from a windows app against the unix server. It does it in command line steps. What I type in is what the app types in. The procedure runs overnight everyday & generates a log on the windows side. The contents of this rolling log shows the incorrect date. I'm happy with writing a script on the windows side to rename & time stamp the log so that a new log generates eachday. The user can then choose to view the log for the day using the time stamp.

Thanks for all your help.

Yogeeraj_1
Honored Contributor

Re: FTP Date

hi again,

at the windows level, the following can also be implemented:

1. create a batch file which looks like this:
[get.cmd]
e.g.
ftp -v -n -i -s:c:\scripts\ftp\get.txt hcp2

2. create a file get.txt containing the instructions that you will normally type during the manual ftp session
[get.txt]
e.g.
user
prompt
bi
cd /tmp
get file*.log
bye


hope this helps!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Raj Mithal_1
Advisor

Re: FTP Date

I will try it.
Thanks
Raj Mithal_1
Advisor

Re: FTP Date

Thanks for all your help