ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: SCP task to preserve exact time stamp
Date Wed, 24 Oct 2007 13:03:47 GMT

Hi,


-----Original Message-----
From: venkata prasad [mailto:prasadeceonline@gmail.com] 
Sent: Wednesday, October 24, 2007 2:13 PM
To: user@ant.apache.org
Subject: SCP task to preserve exact time stamp


/*
   I have a requirement like when ever i do build, i need to copy all
database files/folders from build machine to UNIX machine.

Right now i am uasing SCP Ant task for secure copy. But  it is not
preserving time stamp for all files and folder.

So i went for 'scp' unix command in exec -ant task . It is preserving
time
stamp for some files and folders only.

Could some body help me,  in preserving time stamps for all folders and
files.
*/

the parameters -p -r should do the job

from the scp man page =

"...
-p   Preserves modification times, access times, and modes
      from the original file.

-r   Recursively copy entire directories.
..."

here's a snippet from one of my scripts =

<for list="${updatelist.@{Lum}}" param="copyfile">
<sequential>
<exec executable="ksh" failonerror="true">
<arg value="scp -p -r ./@{Lum}/serverdata@{copyfile}
svcscmcs@@@@@{server}:${scptarget}/@{Lum}/opt/andromeda@{copyfile}" />
</exec>
</sequential>
</for>


Regards, Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message