[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ant-user
Subject:    Re: SCP task to preserve exact time stamp
From:       "Alexis Votta" <alexisvotta () gmail ! com>
Date:       2007-10-25 18:40:01
Message-ID: 3f126fb10710251128u5b7d0da3y347e43491de3329 () mail ! gmail ! com
[Download RAW message or body]

That's because bash excepts a shell script as it's arguments.

Your <exec> translates to "bash scp -p -r ..." and scp is not a
script, it is a binary file. So it fails.

To execute any binary with bash, you need to give the -c argument.

bash -c scp -p -r ...

So you can adjust your <exec> task accordingly.

On 10/24/07, venkata prasad <prasadeceonline@gmail.com> wrote:
> Hi,
>
> With your syntax, it is giving the below error.
>
> /*   <exec executable="bash">
>           <arg line="scp -p -r /ccdata/oracle  /apps/oracle"/>
>      </exec>
> */
>
> /usr/bin/scp:  can't execute binary file.
>
> i am using bash shell.
>
>
> On 10/24/07, Rebhan, Gilbert <Gilbert.Rebhan@huk-coburg.de> wrote:
> >
> >
> > Hi,
> >
> > -----Original Message-----
> > From: venkata prasad [mailto:prasadeceonline@gmail.com]
> > Sent: Wednesday, October 24, 2007 3:15 PM
> > To: Ant Users List
> > Subject: Re: SCP task to preserve exact time stamp
> >
> > /*
> > But i am missing time stamp for some of the files and folders.
> >
> > Is it possible to know what are the files added/modified since last
> > copy?
> > */
> >
> > that's not the point you've asked for - "... preserving timestamps ..."
> >
> > for scp with preserving timestamps the solution which is working
> > perfectly for me is =
> >
> > <exec executable="ksh" failonerror="true">
> > <arg value="scp -p -r
> > ...
> >
> > maybe the syntax of your exec =
> >
> > <exec dir="." executable="scp">
> > <arg line="-p -r /ccdata/oracle  /apps/oracle"/>
> > </exec>
> >
> > is wrong ?!
> >
> > try with =
> >
> > <exec executable="ksh">
> > <arg line="scp -p -r /ccdata/oracle  /apps/oracle"/>
> > </exec>
> >
> > change ksh to your standard shell
> >
> >
> > Regards, Gilbert
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic