File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 15632
    
  15

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scp command confuse
 
Similar Threads
diference between mkdirs and mkdirs?
File Upload
JTree - Compare Nodes problem
creating a tree in JSP
what does this mean ../../