Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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


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.