Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a remote host called myhost and I have some log files that I want to access in the terminal.

For example, I can access this in my browser:

file://myhost/f$/logs/dev.log

But when I try this in the terminal

scp -p "username@myhost:/f$/logs/dev.log" "/home/Documents"

it gives me the 'cannot stat' error:

cp: cannot stat `username@myhost:/f$/logs/dev.log': No such file or directory

I have tried using username@file://myhost and username@//myhost but still no luck.

Any ideas?

Thanks in advance!

share|improve this question
3  
Were exactly is the file stored on your remote host (from /)? Just because it's in myhost/f$/logs/dev.log in your browser does not mean it's in the same spot relative to user-login. Second question is, can you ssh in fine? –  nerdwaller Oct 30 '12 at 15:46
    
Your error message says `username@myhost:/f$/logs/dev.lo' (note missing g at the end). Is that a typo in the error message or the cause of your problem? –  sudo Oct 30 '12 at 16:01
    
The remote host is another machine shared within the network. And yes I can ssh into the machine using the same username but it is strongly not recommended. So maybe that's the problem here? –  John Powel Oct 30 '12 at 16:02
    
@Dennis, good eyes! But that's just a typo. Thanks! –  John Powel Oct 30 '12 at 16:03
    
When you logon with ssh, is it in /f$/logs/dev.log or is it in /_<homedir>_/f$/logs/dev.log? –  BenjiWiebe Oct 30 '12 at 16:06

1 Answer 1

up vote 0 down vote accepted

Let me clarify the solution using wget:

Since I can use the URL to access the file, I simply use this line in my batch:

wget -q //myhost/f$/logs/dev.log -Y off

where "-q" means:

Turn on verbose output, with all the available data. The default output is verbose.

and "-Y" means:

Turn proxy on or off

This will download the file in the current directories and it solves my problem.

Reference: http://www.gnu.org/software/wget/manual/wget.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.