Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to reference a file in the command line, but I keep getting the 'No such file or directory' error. The system uses SSH for the protocol.

Examples (that cause error):

grep regex <SERVER1:/home/app/log/biglog

grep regex <SERVER1:home/app/log/biglog
share|improve this question
    
ssh is not a network-filesystem, it's a remote shell –  Javier Dec 17 '09 at 21:38
    
Javier: Not that what you said isn't true, but there is sshfs, which I would call a network filesystem. –  Kyle Brandt Dec 17 '09 at 21:50
    
I guess you're trying to use the syntax seen in rsync examples. Generally, 'host:path' referencing is only supported by some applications and NOT the shell. Or maybe you're using the wrong shell that does not supoprt such a feature :) –  kolypto Dec 17 '09 at 22:41

1 Answer 1

up vote 2 down vote accepted

umm i think you'll have better luck with this:

ssh <user>@<server> grep regex <path>

share|improve this answer
    
Thanks, that worked. –  Lance Roberts Dec 17 '09 at 21:36

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.