9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] reverse engineering binds
@ 2007-01-11 16:52 erik quanstrom
  0 siblings, 0 replies; 4+ messages in thread
From: erik quanstrom @ 2007-01-11 16:52 UTC (permalink / raw)
  To: steve, 9fans

is this what you're looking for?

- erik

#!/bin/rc
# which

if (~ $#* 0){
	echo 'usage: which file...'
	exit 'usage'
}

for (i in `{ns | awk '$NF == "/bin" {print $(NF -1)}'})
	if (test -f $i/$1)
		echo $i/$1

On Thu Jan 11 11:49:14 EST 2007, steve@quintile.net wrote:
> I want to discover where a file has come from, I understand that
> it will probably lead back to a /srv descriptor or a network connection
> but that is good enough. I need to walk back up the cd and the list of binds
> in the output of ns(1).
>
> I think this needs care to really get it right, so, has anyone got some
> C or rc that does this or shall I just fumble around until I sort it out
> for myself :-)
>
> Thanks guys,
>
> -Steve


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] reverse engineering binds
  2007-01-11 16:58 ` David Leimbach
@ 2007-01-11 17:32   ` C H Forsyth
  0 siblings, 0 replies; 4+ messages in thread
From: C H Forsyth @ 2007-01-11 17:32 UTC (permalink / raw)
  To: 9fans

i think steve wants a function or script that, given a path,
works out from the ns entries which device or server contains
the path.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] reverse engineering binds
  2007-01-11 16:45 Steve Simon
@ 2007-01-11 16:58 ` David Leimbach
  2007-01-11 17:32   ` C H Forsyth
  0 siblings, 1 reply; 4+ messages in thread
From: David Leimbach @ 2007-01-11 16:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Type "ns" at the shell?  That'll tell you how your namespace was built
right?  Or am I thinking Inferno again?



On 1/11/07, Steve Simon <steve@quintile.net> wrote:
> I want to discover where a file has come from, I understand that
> it will probably lead back to a /srv descriptor or a network connection
> but that is good enough. I need to walk back up the cd and the list of binds
> in the output of ns(1).
>
> I think this needs care to really get it right, so, has anyone got some
> C or rc that does this or shall I just fumble around until I sort it out
> for myself :-)
>
> Thanks guys,
>
> -Steve
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [9fans] reverse engineering binds
@ 2007-01-11 16:45 Steve Simon
  2007-01-11 16:58 ` David Leimbach
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Simon @ 2007-01-11 16:45 UTC (permalink / raw)
  To: 9fans

I want to discover where a file has come from, I understand that
it will probably lead back to a /srv descriptor or a network connection
but that is good enough. I need to walk back up the cd and the list of binds
in the output of ns(1).

I think this needs care to really get it right, so, has anyone got some
C or rc that does this or shall I just fumble around until I sort it out
for myself :-)

Thanks guys,

-Steve


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-11 17:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-11 16:52 [9fans] reverse engineering binds erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2007-01-11 16:45 Steve Simon
2007-01-11 16:58 ` David Leimbach
2007-01-11 17:32   ` C H Forsyth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).