9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rsc@plan9.bell-labs.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] UNIX to Plan9 Command Translation?
Date: Thu, 15 Jun 2000 15:14:29 -0400	[thread overview]
Message-ID: <200006151914.PAA06832@smtp1.fas.harvard.edu> (raw)

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


             reply	other threads:[~2000-06-15 19:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-15 19:14 rsc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-06-16  0:12 Russ Cox
2000-06-15 19:45 tad
2000-06-15 19:32 Russ Cox
2000-06-15 19:22 tad
2000-06-15 22:14 ` Richard
2000-06-15 19:12 forsyth
2000-06-15 19:00 rob pike
2000-06-15 18:17 Stephen Wynne
2000-06-15 18:33 ` Berry Kercheval
2000-06-15 19:02 ` Nigel Roles

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200006151914.PAA06832@smtp1.fas.harvard.edu \
    --to=rsc@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).