aspose file tools*
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
Author

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.)


<i>Mike</i>
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16070
    
  21

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


Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: scp command confuse