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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > -----Original Message----- > > From: venkata prasad [mailto:[EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]