Help!

Changing the time/date stamp through FTP

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Setup RSS
Next:  Accepted ecryptfs-utils 83-2 (source i386)  
Author Message
kaari
External


Since: Dec 16, 2009
Posts: 7



PostPosted: Wed Sep 01, 2010 6:12 am    Post subject: Changing the time/date stamp through FTP
Archived from groups: comp>os>linux>setup (more info?)

Hi all,

I have a ftp server called UPDATE where as it contains all the update
files (content and image) of a web server. Updates are upload once two
days.I have ftp and ssh connections to this FTP server from my
location.

What i need to do is, through ftp,

I want to change the update fils's time / date stamp.

e.g if there is a update file named

imageupdate-20100830.tar.gz with the time stamp of 2010 08 30 7.30 a.m

i need to change the time stamp of that file to today (i.e 2010 09 01
x.xx a.m).

If i can do it remotely for update files that would achieve my target.

Can anyone give me a assistance on this..

Please, Many thanks in advance
Back to top
kaari
External


Since: Dec 16, 2009
Posts: 7



PostPosted: Wed Sep 01, 2010 9:03 am    Post subject: Re: Changing the time/date stamp through FTP [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 1, 3:26 pm, Aragorn wrote:
> On Wednesday 01 September 2010 11:12 in comp.os.linux.setup, somebody
>
>
>
> identifying as kaari wrote...
> > Hi all,
>
> > I have a ftp server called UPDATE where as it contains all the update
> > files (content and image) of a web server. Updates are upload once two
> > days.I have ftp and ssh connections to this FTP server from my
> > location.
>
> > What i need to do is, through ftp,
>
> > I want to change the update fils's time / date stamp.
>
> > e.g if there is a update file named
>
> > imageupdate-20100830.tar.gz with the time stamp of 2010 08 30 7.30 a.m
>
> > i need to change the time stamp of that file to today (i.e 2010 09 01
> > x.xx a.m).
>
> > If i can do it remotely for update files that would achieve my target.
>
> > Can anyone give me a assistance on this..
>
> > Please, Many thanks in advance
>
> I don't know of any FTP implementation that would allow this without
> overwriting/modifying the target file, but you /can/ do it via SSH, of
> course, and you did say that you have an SSH connection to the machine.
>
>         man touch
>
> ... will tell you how to update or change a file's timestamps. Wink
>
> --
> *Aragorn*
> (registered GNU/Linux user #223157)

Hi Aragorn,

I already tried touch -t YYYYMMDD filename and

MDTM too but no luck since

FTP> help

not listing "touch" and "mdtm" as possible commands in ftp.

i've used following bash to do it with no luck. So i'm looking any
more options of doing this.

#!/bin/bash
ftp -inv <<EOF
open 192.168.0.19
user username passwd
cd 20100901-test
bin
mdtm 20100901170000 imageupdate-20100901.tar.gz # or touch -t
xxxxxxx filename
EOF


If any one can help me with this. Basically I need a way to set
timestamp of a file without using "touch"
Back to top
Aragorn
External


Since: Feb 22, 2009
Posts: 87



PostPosted: Wed Sep 01, 2010 11:10 am    Post subject: Re: Changing the time/date stamp through FTP [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wednesday 01 September 2010 11:12 in comp.os.linux.setup, somebody
identifying as kaari wrote...

> Hi all,
>
> I have a ftp server called UPDATE where as it contains all the update
> files (content and image) of a web server. Updates are upload once two
> days.I have ftp and ssh connections to this FTP server from my
> location.
>
> What i need to do is, through ftp,
>
> I want to change the update fils's time / date stamp.
>
> e.g if there is a update file named
>
> imageupdate-20100830.tar.gz with the time stamp of 2010 08 30 7.30 a.m
>
> i need to change the time stamp of that file to today (i.e 2010 09 01
> x.xx a.m).
>
> If i can do it remotely for update files that would achieve my target.
>
> Can anyone give me a assistance on this..
>
> Please, Many thanks in advance

I don't know of any FTP implementation that would allow this without
overwriting/modifying the target file, but you /can/ do it via SSH, of
course, and you did say that you have an SSH connection to the machine.

man touch

.... will tell you how to update or change a file's timestamps. Wink

--
*Aragorn*
(registered GNU/Linux user #223157)
Back to top
unruh
External


Since: Nov 30, 2009
Posts: 116



PostPosted: Wed Sep 01, 2010 2:10 pm    Post subject: Re: Changing the time/date stamp through FTP [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2010-09-01, kaari wrote:
> On Sep 1, 3:26?pm, Aragorn wrote:
>> On Wednesday 01 September 2010 11:12 in comp.os.linux.setup, somebody
>>
>>
>>
>> identifying as kaari wrote...
>> > Hi all,
>>
>> > I have a ftp server called UPDATE where as it contains all the update
>> > files (content and image) of a web server. Updates are upload once two
>> > days.I have ftp and ssh connections to this FTP server from my
>> > location.
>>
>> > What i need to do is, through ftp,
>>
>> > I want to change the update fils's time / date stamp.
>>
>> > e.g if there is a update file named
>>
>> > imageupdate-20100830.tar.gz with the time stamp of 2010 08 30 7.30 a.m
>>
>> > i need to change the time stamp of that file to today (i.e 2010 09 01
>> > x.xx a.m).
>>
>> > If i can do it remotely for update files that would achieve my target.
>>
>> > Can anyone give me a assistance on this..
>>
>> > Please, Many thanks in advance
>>
>> I don't know of any FTP implementation that would allow this without
>> overwriting/modifying the target file, but you /can/ do it via SSH, of
>> course, and you did say that you have an SSH connection to the machine.
>>
>> ? ? ? ? man touch
>>
>> ... will tell you how to update or change a file's timestamps. Wink
>>
>> --
>> *Aragorn*
>> (registered GNU/Linux user #223157)
>
> Hi Aragorn,
>
> I already tried touch -t YYYYMMDD filename and
>
> MDTM too but no luck since
>
> FTP> help
>
> not listing "touch" and "mdtm" as possible commands in ftp.
>

No. You said you had ssh intot hat system as well. Use ssh and touch,
not ftp.
But first tell us why youwnat to do this.


> i've used following bash to do it with no luck. So i'm looking any
> more options of doing this.
>
> #!/bin/bash
> ftp -inv <<EOF
> open 192.168.0.19
> user username passwd
> cd 20100901-test
> bin
> mdtm 20100901170000 imageupdate-20100901.tar.gz # or touch -t
> xxxxxxx filename
> EOF
>
>
> If any one can help me with this. Basically I need a way to set
> timestamp of a file without using "touch"
Back to top
AJ
External


Since: Sep 01, 2010
Posts: 2



PostPosted: Thu Sep 02, 2010 12:47 am    Post subject: Re: Changing the time/date stamp through FTP [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 1, 11:27 pm, unruh wrote:
> On 2010-09-01, kaari wrote:
>
>
>
> > On Sep 1, 3:26?pm, Aragorn wrote:
> >> On Wednesday 01 September 2010 11:12 in comp.os.linux.setup, somebody
>
> >> identifying as kaari wrote...
> >> > Hi all,
>
> >> > I have a ftp server called UPDATE where as it contains all the update
> >> > files (content and image) of a web server. Updates are upload once two
> >> > days.I have ftp and ssh connections to this FTP server from my
> >> > location.
>
> >> > What i need to do is, through ftp,
>
> >> > I want to change the update fils's time / date stamp.
>
> >> > e.g if there is a update file named
>
> >> > imageupdate-20100830.tar.gz with the time stamp of 2010 08 30 7.30 a..m
>
> >> > i need to change the time stamp of that file to today (i.e 2010 09 01
> >> > x.xx a.m).
>
> >> > If i can do it remotely for update files that would achieve my target.
>
> >> > Can anyone give me a assistance on this..
>
> >> > Please, Many thanks in advance
>
> >> I don't know of any FTP implementation that would allow this without
> >> overwriting/modifying the target file, but you /can/ do it via SSH, of
> >> course, and you did say that you have an SSH connection to the machine..
>
> >> ? ? ? ? man touch
>
> >> ... will tell you how to update or change a file's timestamps. Wink
>
> >> --
> >> *Aragorn*
> >> (registered GNU/Linux user #223157)
>
> > Hi Aragorn,
>
> > I already tried touch -t YYYYMMDD filename and
>
> > MDTM too but no luck since
>
> > FTP> help
>
> > not listing "touch" and "mdtm" as possible commands in ftp.
>
> No. You said you had ssh intot hat system as well. Use ssh and touch,
> not ftp.
> But first tell us why youwnat to do this.
>
> > i've used following bash to do it with no luck. So i'm looking any
> > more options of doing this.
>
> > #!/bin/bash
> > ftp -inv <<EOF
> >  open 192.168.0.19
> >  user username passwd
> >  cd 20100901-test
> >  bin
> >  mdtm 20100901170000 imageupdate-20100901.tar.gz    # or touch -t
> > xxxxxxx filename
> > EOF
>
> > If any one can help me with this. Basically I need a way to set
> > timestamp of a file without using "touch"

Try to use SFTP
Back to top
AJ
External


Since: Sep 01, 2010
Posts: 2



PostPosted: Thu Sep 02, 2010 1:03 am    Post subject: Re: Changing the time/date stamp through FTP [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 2, 1:47 pm, AJ wrote:
> On Sep 1, 11:27 pm, unruh wrote:
>
>
>
> > On 2010-09-01, kaari wrote:
>
> > > On Sep 1, 3:26?pm, Aragorn wrote:
> > >> On Wednesday 01 September 2010 11:12 in comp.os.linux.setup, somebody
>
> > >> identifying as kaari wrote...
> > >> > Hi all,
>
> > >> > I have a ftp server called UPDATE where as it contains all the update
> > >> > files (content and image) of a web server. Updates are upload once two
> > >> > days.I have ftp and ssh connections to this FTP server from my
> > >> > location.
>
> > >> > What i need to do is, through ftp,
>
> > >> > I want to change the update fils's time / date stamp.
>
> > >> > e.g if there is a update file named
>
> > >> > imageupdate-20100830.tar.gz with the time stamp of 2010 08 30 7.30 a.m
>
> > >> > i need to change the time stamp of that file to today (i.e 2010 09 01
> > >> > x.xx a.m).
>
> > >> > If i can do it remotely for update files that would achieve my target.
>
> > >> > Can anyone give me a assistance on this..
>
> > >> > Please, Many thanks in advance
>
> > >> I don't know of any FTP implementation that would allow this without
> > >> overwriting/modifying the target file, but you /can/ do it via SSH, of
> > >> course, and you did say that you have an SSH connection to the machine.
>
> > >> ? ? ? ? man touch
>
> > >> ... will tell you how to update or change a file's timestamps. Wink
>
> > >> --
> > >> *Aragorn*
> > >> (registered GNU/Linux user #223157)
>
> > > Hi Aragorn,
>
> > > I already tried touch -t YYYYMMDD filename and
>
> > > MDTM too but no luck since
>
> > > FTP> help
>
> > > not listing "touch" and "mdtm" as possible commands in ftp.
>
> > No. You said you had ssh intot hat system as well. Use ssh and touch,
> > not ftp.
> > But first tell us why youwnat to do this.
>
> > > i've used following bash to do it with no luck. So i'm looking any
> > > more options of doing this.
>
> > > #!/bin/bash
> > > ftp -inv <<EOF
> > >  open 192.168.0.19
> > >  user username passwd
> > >  cd 20100901-test
> > >  bin
> > >  mdtm 20100901170000 imageupdate-20100901.tar.gz    # or touch -t
> > > xxxxxxx filename
> > > EOF
>
> > > If any one can help me with this. Basically I need a way to set
> > > timestamp of a file without using "touch"
>
> Try to use SFTP
rename oldpath newpath
Rename remote file from oldpath to newpath.
**man sftp
Back to top
kaari
External


Since: Dec 16, 2009
Posts: 7



PostPosted: Thu Sep 02, 2010 1:25 am    Post subject: Re: Changing the time/date stamp through FTP [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 1, 6:27 pm, unruh wrote:
> On 2010-09-01, kaari wrote:
>
>
>
> > On Sep 1, 3:26?pm, Aragorn wrote:
> >> On Wednesday 01 September 2010 11:12 in comp.os.linux.setup, somebody
>
> >> identifying as kaari wrote...
> >> > Hi all,
>
> >> > I have a ftp server called UPDATE where as it contains all the update
> >> > files (content and image) of a web server. Updates are upload once two
> >> > days.I have ftp and ssh connections to this FTP server from my
> >> > location.
>
> >> > What i need to do is, through ftp,
>
> >> > I want to change the update fils's time / date stamp.
>
> >> > e.g if there is a update file named
>
> >> > imageupdate-20100830.tar.gz with the time stamp of 2010 08 30 7.30 a..m
>
> >> > i need to change the time stamp of that file to today (i.e 2010 09 01
> >> > x.xx a.m).
>
> >> > If i can do it remotely for update files that would achieve my target.
>
> >> > Can anyone give me a assistance on this..
>
> >> > Please, Many thanks in advance
>
> >> I don't know of any FTP implementation that would allow this without
> >> overwriting/modifying the target file, but you /can/ do it via SSH, of
> >> course, and you did say that you have an SSH connection to the machine..
>
> >> ? ? ? ? man touch
>
> >> ... will tell you how to update or change a file's timestamps. Wink
>
> >> --
> >> *Aragorn*
> >> (registered GNU/Linux user #223157)
>
> > Hi Aragorn,
>
> > I already tried touch -t YYYYMMDD filename and
>
> > MDTM too but no luck since
>
> > FTP> help
>
> > not listing "touch" and "mdtm" as possible commands in ftp.
>
> No. You said you had ssh intot hat system as well. Use ssh and touch,
> not ftp.
> But first tell us why youwnat to do this.
>
> > i've used following bash to do it with no luck. So i'm looking any
> > more options of doing this.
>
> > #!/bin/bash
> > ftp -inv <<EOF
> >  open 192.168.0.19
> >  user username passwd
> >  cd 20100901-test
> >  bin
> >  mdtm 20100901170000 imageupdate-20100901.tar.gz    # or touch -t
> > xxxxxxx filename
> > EOF
>
> > If any one can help me with this. Basically I need a way to set
> > timestamp of a file without using "touch"

The maintainer of the server has a script which deletes all the update
files which are older than2 weeks. but some of them are still needed
even after 2weeks. So i'm lookning for a way to do what i've trying to
do in the first place.

For AJ,

Thanks, they are using VSFTP.

Still no luck.
Back to top
kaari
External


Since: Dec 16, 2009
Posts: 7



PostPosted: Thu Sep 02, 2010 9:14 am    Post subject: Re: Changing the time/date stamp through FTP [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 1, 6:27 pm, unruh wrote:
> On 2010-09-01, kaari wrote:
>
>
>
> > On Sep 1, 3:26?pm, Aragorn wrote:
> >> On Wednesday 01 September 2010 11:12 in comp.os.linux.setup, somebody
>
> >> identifying as kaari wrote...
> >> > Hi all,
>
> >> > I have a ftp server called UPDATE where as it contains all the update
> >> > files (content and image) of a web server. Updates are upload once two
> >> > days.I have ftp and ssh connections to this FTP server from my
> >> > location.
>
> >> > What i need to do is, through ftp,
>
> >> > I want to change the update fils's time / date stamp.
>
> >> > e.g if there is a update file named
>
> >> > imageupdate-20100830.tar.gz with the time stamp of 2010 08 30 7.30 a..m
>
> >> > i need to change the time stamp of that file to today (i.e 2010 09 01
> >> > x.xx a.m).
>
> >> > If i can do it remotely for update files that would achieve my target.
>
> >> > Can anyone give me a assistance on this..
>
> >> > Please, Many thanks in advance
>
> >> I don't know of any FTP implementation that would allow this without
> >> overwriting/modifying the target file, but you /can/ do it via SSH, of
> >> course, and you did say that you have an SSH connection to the machine..
>
> >> ? ? ? ? man touch
>
> >> ... will tell you how to update or change a file's timestamps. Wink
>
> >> --
> >> *Aragorn*
> >> (registered GNU/Linux user #223157)
>
> > Hi Aragorn,
>
> > I already tried touch -t YYYYMMDD filename and
>
> > MDTM too but no luck since
>
> > FTP> help
>
> > not listing "touch" and "mdtm" as possible commands in ftp.
>
> No. You said you had ssh intot hat system as well. Use ssh and touch,
> not ftp.
> But first tell us why youwnat to do this.
>
> > i've used following bash to do it with no luck. So i'm looking any
> > more options of doing this.
>
> > #!/bin/bash
> > ftp -inv <<EOF
> >  open 192.168.0.19
> >  user username passwd
> >  cd 20100901-test
> >  bin
> >  mdtm 20100901170000 imageupdate-20100901.tar.gz    # or touch -t
> > xxxxxxx filename
> > EOF
>
> > If any one can help me with this. Basically I need a way to set
> > timestamp of a file without using "touch"

Hi

I was mistaken, My 192.168.0.19 was the server that i was testing
this. and it is a local linux box (centos). But the update ftp server
is somewhere else. and only having the ftp connection. So no option
but to try everything with FTP. Otherwise through ssh it could achieve
very easily.

Any help is appreciated greatly

Thanks
Back to top
Nico Kadel-Garcia
External


Since: Jul 05, 2009
Posts: 44



PostPosted: Fri Sep 03, 2010 10:04 am    Post subject: Re: Changing the time/date stamp through FTP [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 1, 5:12 am, kaari wrote:
> Hi all,
>
> I have a ftp server called UPDATE where as it contains all the update
> files (content and image) of a web server. Updates are upload once two
> days.I have ftp and ssh connections to this FTP server from my
> location.
>
> What i need to do is, through ftp,
>
> I want to change the update fils's time / date stamp.
>
> e.g if there is a update file named
>
> imageupdate-20100830.tar.gz with the time stamp of 2010 08 30 7.30 a.m
>
> i need to change the time stamp of that file to today (i.e 2010 09 01
> x.xx a.m).
>
> If i can do it remotely for update files that would achieve my target.
>
> Can anyone give me a assistance on this..
>
> Please, Many thanks in advance

Perhaps you could investigate rsync, which is considerably more
efficient than an FTP trasfer, works over SSH well, and allows
considerable local control of the file you want to send before you
send it?
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Setup All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum