File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes scp command confuse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "scp command confuse" Watch "scp command confuse" New topic

scp command confuse

Mike Sever
Ranch Hand

Joined: Jul 24, 2006
Posts: 56
There is a job to call a .ksh file, in which it will execute "/usr/local/bin/scp Folder1/20070201* Folder2/". (both Folder1 & Folder2 are on same machine)
The log of job is:
Folder1/200702010000.txt | 1.2kB | 1.2kB/s | TOC: 00:00:01
scp: warning: stat: 20070201* (src): no such file (server msg: 'syserr: No such file or directory, file: 20070201*')

What could be the problem? Since the size of that file could be recognized, why can not copy it by scp? (I've also checked the timestamp of "Folder1/200702010000.txt" which is early to the time of calling job.)

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

When in doubt, use an absolute pathname. SCP files are otherwise looked for relative to the home directory of the user's account.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: scp command confuse
It's not a secret anymore!