Quote:
Originally Posted by rayalab
so I have added >> statusLog.log to rsync creation logic in java. but getting below error.
'rsync: link_stat "www@www.dev.com:"/local/myFiles/file.zip"" failed: No such file or directory (2)'
'rsync: link_stat " >> " failed: No such file or directory (2)'
|
The Java application tries to access a file called ">>" and fails.
The
>> redirector works from the shell, but will not necessarily work when used from inside an application, unless that application happens to be passing the entire argument verbatim to a shell, which is unlikely.
You will need to find another way to append data to a log file. You could try redirecting output from the parent (Java) process, but that might not be ideal if the Java app generates other output to stdout.
How about having the Java app call a shell script, and then start
rsync with the appropriate redirection from there?