Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scp command confuse

 
Mike Sever
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When in doubt, use an absolute pathname. SCP files are otherwise looked for relative to the home directory of the user's account.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic