9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] UNIX to Plan9 Command Translation?
@ 2000-06-15 18:17 Stephen Wynne
  2000-06-15 18:33 ` Berry Kercheval
  2000-06-15 19:02 ` Nigel Roles
  0 siblings, 2 replies; 11+ messages in thread
From: Stephen Wynne @ 2000-06-15 18:17 UTC (permalink / raw)
  To: 9fans

There must be 9ish ways to do all of these things:

    UNIX                    Plan9

    df(1)                   ?
    mount(1) [-p flag]	    np
    more(1)                 p (I want less(1), actually.)
    shutdown(1m)            disk/kfscmd halt (and?)
    id(1)                   ?
    find(1)                 ? (!)
    apropos(1)              ?
    uptime(1)               ?
    head(1)                 sed -n 1,Np
    netstat(1m) [-r flag]   ?
    last(1)                 ?
    vmstat(1m)              ?
    iostat(1m)              ?
    nfsstat(1m)             ? (for 9fs)
    ufs{dump|restore}(1m)   ?
    pkginfo(1m)             ?
    snoop(1m)		    ?
    tcpdump(1)              ?

Maybe an updated guide like Steve Kotsopoulos' v2 tips page would be
nice.


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

* Re: [9fans] UNIX to Plan9 Command Translation?
  2000-06-15 18:17 [9fans] UNIX to Plan9 Command Translation? Stephen Wynne
@ 2000-06-15 18:33 ` Berry Kercheval
  2000-06-15 19:02 ` Nigel Roles
  1 sibling, 0 replies; 11+ messages in thread
From: Berry Kercheval @ 2000-06-15 18:33 UTC (permalink / raw)
  To: Stephen Wynne, 9fans

At 02:17 PM 06/15/2000 -0400, Stephen Wynne wrote:

>     head(1)                 sed -n 1,Np

If you want to show the first, say, 10 lines, it's easier to just type "sed
10q"

Remember that the default sed action is p.


   --berry
--
Berry Kercheval :: Ajuba Solutions :: http://www.ajubasolutions.com
Berry@ajubasolutions.com                 (Formerly Scriptics Corp.)


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

* Re: [9fans] UNIX to Plan9 Command Translation?
  2000-06-15 18:17 [9fans] UNIX to Plan9 Command Translation? Stephen Wynne
  2000-06-15 18:33 ` Berry Kercheval
@ 2000-06-15 19:02 ` Nigel Roles
  1 sibling, 0 replies; 11+ messages in thread
From: Nigel Roles @ 2000-06-15 19:02 UTC (permalink / raw)
  To: 9fans

find(1)        du -a | grep (at least to do -name anyway)

----- Original Message -----
From: "Stephen Wynne" <stevemw@mindspring.com>
To: <9fans@cse.psu.edu>
Sent: Thursday, June 15, 2000 7:17 PM
Subject: [9fans] UNIX to Plan9 Command Translation?


> There must be 9ish ways to do all of these things:
>
>     UNIX                    Plan9
>
>     df(1)                   ?
>     mount(1) [-p flag]     np
>     more(1)                 p (I want less(1), actually.)
>     shutdown(1m)            disk/kfscmd halt (and?)
>     id(1)                   ?
>     find(1)                 ? (!)
>     apropos(1)              ?
>     uptime(1)               ?
>     head(1)                 sed -n 1,Np
>     netstat(1m) [-r flag]   ?
>     last(1)                 ?
>     vmstat(1m)              ?
>     iostat(1m)              ?
>     nfsstat(1m)             ? (for 9fs)
>     ufs{dump|restore}(1m)   ?
>     pkginfo(1m)             ?
>     snoop(1m)     ?
>     tcpdump(1)              ?
>
> Maybe an updated guide like Steve Kotsopoulos' v2 tips page would be
> nice.



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

* Re: [9fans] UNIX to Plan9 Command Translation?
@ 2000-06-16  0:12 Russ Cox
  0 siblings, 0 replies; 11+ messages in thread
From: Russ Cox @ 2000-06-16  0:12 UTC (permalink / raw)
  To: 9fans

    ufs{dump|restore}(1m)   yesterday

	also disk/mkext -a  with appropriate options (use disk/mkext to extract) to
	make more conventional backups if you haven't the wonder of a file server.
	(note that you can configure a file server as a pseudo worm on normal discs
	if you haven't got a jukebox, and use mkfs or some other means to make
	snapshots to recover from disaster)


	the new wrap helps to create packages of software.  not really a backup
	but it's bound to have peculiar uses.

    pkginfo(1m)             ??
	guessing that it's bound up with the pkginstall stuff, i suppose the closest
	equivalent is  wrap/info
	and  gunzip <package.9gz| disk/mkext -h



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

* Re: [9fans] UNIX to Plan9 Command Translation?
  2000-06-15 19:22 tad
@ 2000-06-15 22:14 ` Richard
  0 siblings, 0 replies; 11+ messages in thread
From: Richard @ 2000-06-15 22:14 UTC (permalink / raw)
  To: 9fans

tad@plan9.bell-labs.com writes:

>    more(1)                 p (I want less(1), actually.)
>
>							cat(1) with
>scroll disabled in the window
>							DELETE kills the cat and scrolls to the bottom
>							cursor up and down act as page up and page down
>							If I need to search, I use plumbing (or type B filename)
>							to push it into acme(1) or sam(1).

could you keep lines shorter than 80 chars in the future?


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

* Re: [9fans] UNIX to Plan9 Command Translation?
@ 2000-06-15 19:45 tad
  0 siblings, 0 replies; 11+ messages in thread
From: tad @ 2000-06-15 19:45 UTC (permalink / raw)
  To: tad, stevemw, 9fans

>    find(1)                 grep pattern `{du -a root}

Whoops

>    find(1)                 grep pattern `{du -a root}

	-name					du -a  root | grep name
	pattern in a file	 	grep -n pattern `{du -a root | awk '{print $2}}

-Tad


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

* Re: [9fans] UNIX to Plan9 Command Translation?
@ 2000-06-15 19:32 Russ Cox
  0 siblings, 0 replies; 11+ messages in thread
From: Russ Cox @ 2000-06-15 19:32 UTC (permalink / raw)
  To: 9fans

	also see mk9660, and cdfs with writable cds (or cdrw), which i am just now
	trying, as it happens.

The BUGS section of the mk9660(8) man page
is worth pointing out.  I'm still trying to get the Joliet
stuff right, but Microsoft is a bit finicky and I haven't
really gotten back to it since the distribution happened.

Russ



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

* Re: [9fans] UNIX to Plan9 Command Translation?
@ 2000-06-15 19:22 tad
  2000-06-15 22:14 ` Richard
  0 siblings, 1 reply; 11+ messages in thread
From: tad @ 2000-06-15 19:22 UTC (permalink / raw)
  To: stevemw, 9fans

I'm hazy on two of these:

    df(1)                   ?
    last(1)                 ?

Here are reasonable answers for the remaining ones:

    mount(1) [-p flag]	    mount(1)
							bind(1)
							unmount(1)
							9fs(1)
							srv(1)
							import(4)
							exportfs(4)
			-p				ns(1)

    more(1)                 p (I want less(1), actually.)
							cat(1) with scroll disabled in the window
							DELETE kills the cat and scrolls to the bottom
							cursor up and down act as page up and page down
							If I need to search, I use plumbing (or type B filename)
							to push it into acme(1) or sam(1).

    shutdown(1m)            disk/kfscmd halt
							echo reboot > /dev/reboot
							echo panic > /dev/reboot

    id(1)                   grep `{cat /dev/user} /adm/users

    find(1)                 grep pattern `{du -a root}

    apropos(1)              lookman(1)

    uptime(1)               http://www.csh-east.org/~tad/plan9/uptime.c

    head(1)                 sed -n 1,Np
							sed Nq

    netstat(1m) [-r flag]   netstat(1)
				-r			cat /net/iproute

    vmstat(1m)              stats(1)

    iostat(1m)              iostats(4)

    nfsstat(1m)             iostats(4)

    ufs{dump|restore}(1m)   fs(4)
							history(1)
							yesterday(1)
    pkginfo(1m)             wrap(8)

    snoop(1m)		    	snoopy(8)

    tcpdump(1)              snoopy(8)

-Tad


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

* Re: [9fans] UNIX to Plan9 Command Translation?
@ 2000-06-15 19:14 rsc
  0 siblings, 0 replies; 11+ messages in thread
From: rsc @ 2000-06-15 19:14 UTC (permalink / raw)
  To: 9fans

Brian Kernighan wrote for the second edition,
``Plan 9 is not UNIX.  If you think of it as UNIX,
you'll often be frustrated because something doesn't
exist or works differently.  If you think of it as
Plan 9, however, you'll find that most of it works
very smoothly, and that there are some truly neat
ideas that make things much cleaner than you
have seen before''.

That quoted, I sometimes miss df and uptime too.

    df(1)                   ?

There's no way to do this in the file protocol,
so in general, you can't.  The last paragraph
of the "The File Server" section in the
Plan 9 from Bell Labs paper explains one reason why.

A shell script a bit large to post here works
on kfs partitions.

hget http://plan9.bell-labs.com/~rsc/plan9/df

    more(1)                 p (I want less(1), actually.)

Experiment with scroll mode and noscroll mode
in rio's button 2 menu.

    shutdown(1m)            disk/kfscmd halt (and?)

And Ctl-Alt-Del or ^T^Tr.  If you're booting
from a network file server (and thus have no
kfs local disk), you can just turn the machine off.
It takes a little getting used to.

    id(1)                   ?

cat /dev/user
echo $user
grep $user /adm/users

id(1) doesn't really make too much sense, since
who you are depends on which file server you are
speaking with.  I am the plan9.bell-labs.com rsc
on some 9P connections, the eecs.harvard.edu rsc on
other 9P connections, and just none on some u9fs
over SSH connections.

    find(1)                 ? (!)

du -a | awk '{print $2}' is usually a good start.

    apropos(1)              ?

man(1) is usually enough that this hasn't been done.

    uptime(1)               ?

cat /dev/time (see cons(3))/

A shell script a bit too ugly to post here is at
hget http://plan9.bell-labs.com/~rsc/plan9/uptime,

    netstat(1m) [-r flag]   ?

cat /dev/iproute (see ip(3))

    last(1)                 ?

This doesn't make a whole lot of sense even in
UNIX.  Since we don't have ttys, it makes even
less sense here -- when do you log and when do
you not?  What's the difference between someone
who is logged in and a cron job running as that
person?  How can you tell?

    vmstat(1m)              ?

cat /dev/swap
stats -mw

gets you some of that.

    iostat(1m)              ?
    nfsstat(1m)             ? (for 9fs)

Poke around in '#z' and have a look at
/sys/src/9/port/devmntstats.c

    snoop(1m)		    ?
    tcpdump(1)              ?

snoopy(8)

    ufs{dump|restore}(1m)   ?
    pkginfo(1m)             ?

mkfs(8) and wrap(8).

Russ


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

* Re: [9fans] UNIX to Plan9 Command Translation?
@ 2000-06-15 19:12 forsyth
  0 siblings, 0 replies; 11+ messages in thread
From: forsyth @ 2000-06-15 19:12 UTC (permalink / raw)
  To: 9fans

    ufs{dump|restore}(1m)   yesterday

	also disk/mkext -a  with appropriate options (use disk/mkext to extract) to
	make more conventional backups if you haven't the wonder of a file server.
	(note that you can configure a file server as a pseudo worm on normal discs
	if you haven't got a jukebox, and use mkfs or some other means to make
	snapshots to recover from disaster)

	also see mk9660, and cdfs with writable cds (or cdrw), which i am just now
	trying, as it happens.

	the new wrap helps to create packages of software.  not really a backup
	but it's bound to have peculiar uses.

    pkginfo(1m)             ??
	guessing that it's bound up with the pkginstall stuff, i suppose the closest
	equivalent is  wrap/info
	and  gunzip <package.9gz| disk/mkext -h



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

* Re: [9fans] UNIX to Plan9 Command Translation?
@ 2000-06-15 19:00 rob pike
  0 siblings, 0 replies; 11+ messages in thread
From: rob pike @ 2000-06-15 19:00 UTC (permalink / raw)
  To: 9fans


    df(1)                   disk/kfscmd check (kinda)
    mount(1) [-p flag]	    np
    more(1)                 p
    shutdown(1m)            disk/kfscmd halt
    id(1)                   echo $user or cat /dev/user
    find(1)                 du -a
    apropos(1)              lookman
    uptime(1)               echo $boottime
    head(1)                 sed 10q
    netstat(1m) [-r flag]   netstat
    last(1)                 N.A.
    vmstat(1m)              cat /dev/sysstat
    iostat(1m)              cat /net/ether0/0/stats and things like that; also run stats(1)
				plan 9 iostats(4) is much more intersing
    nfsstat(1m)             iostats(4) is close
    ufs{dump|restore}(1m)   yesterday
    pkginfo(1m)             ??
    snoop(1m)		  snoopy(8)
    tcpdump(1)              snoopy(8)



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

end of thread, other threads:[~2000-06-16  0:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-15 18:17 [9fans] UNIX to Plan9 Command Translation? Stephen Wynne
2000-06-15 18:33 ` Berry Kercheval
2000-06-15 19:02 ` Nigel Roles
2000-06-15 19:00 rob pike
2000-06-15 19:12 forsyth
2000-06-15 19:14 rsc
2000-06-15 19:22 tad
2000-06-15 22:14 ` Richard
2000-06-15 19:32 Russ Cox
2000-06-15 19:45 tad
2000-06-16  0:12 Russ Cox

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