Mailinglist Archive: opensuse (714 mails)

< Previous Next >
Re: [opensuse] Remote files using SSHFS without mounting
On 10/27/2011 10:31 AM, Anton Aylward wrote:
Dave Howorth said the following on 10/27/2011 08:40 AM:
Anton Aylward wrote:
What I want to do is that in a general sense, for example

$ diff localfile anton@remotesystem:remotefile

rsync with suitable options

$ tail anton@remotesystem:remotefile

ssh anton@remotesystem tail remotefile



I think you are missing my point.
You've given specific and non-general alternatives to my two examples.
I could come up with any number of examples and we could spend eternity
playing pin-pong with them.

What I'm looking for is something that threats a file argument to a
command - ANY COMMAND - in a general way. With a consistent syntax.

For example, the 'diff' should be able to extend to 'diff3':

$ diff3 $ARG1 $ARG2 $ARG3

where ARG{123} should be any valid file name syntax.

A user who knows how to use diff should be able to keep using diff.
Scripts that have diff embedded in them still work even when invoked
with a "user@machine:file".


The whole point of FUSE is to make the transport transparent.

What I'm asking for is to get around the remote mounting.

The only way I can see is if you teach you shell how to recognize urls, do whatever mounting or ftping or wgetting or smb_clienting etc is implied by the url, and re-writes the command line before executing the command.

You might be able to do this, poorly and incompletely, and breaking assumptions the rest of your system knows are supposed to be safe, by writing a custom module in zsh.

Have fun with that.

Or I suppose you could hack the libc and kernel source to change all file functions to recognize and specially handle urls.

Except, http://foo.foo.com/blah is a perfectly valid local filesystem path. You can have a directory named "http:", you can have two "/" next to each other and it means the same as just one, for a reason (think building paths out of variables and one variable may be empty sometimes and sometimes not), even the ?'s and @'s and %'s in a query string are all valid filesystem characters.

And these are actually even used sometimes, like mirroring web sites.

Your wish is understandable, in the way that lots of ill considered wishes are understandable.

--
bkw
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >