Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

scp command confuse  RSS feed

 
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
Bartender
Posts: 18531
61
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!