[net.unix-wizards] /usr/ucb/u

sid@linus.UUCP (Sid Stuart) (03/22/84)

	Does anyone know about the u command in 4.1-2 bsd /usr/ucb?
I haven't found any online documentation about it and I did not find it
in /usr/src/ucb. When called, it returns the current login names, but it is
larger than the whoami image.

					sid@linus

sid@linus.UUCP (Sid Stuart) (03/22/84)

	/usr/ucb/u is a link to /usr/ucb/users. Sometimes I wish
THEY would document this stuff.

					Sorry about that,
					sid@linus

scarton@inmet.UUCP (03/29/84)

#R:linus:-83100:inmet:10300012:000:339
inmet!scarton    Mar 27 16:56:00 1984

I believe that the `/usr/ucb/u' command is nothing more than a link
to the `w' command with a different name.  If you look at the source
to `w', it sets the variable firstchar to the first character of the
command name.  If firstchar == 'u', it then only prints the header
information displayed by `w'.  Two commands for the price of one.

alt@Sri-Tsc.ARPA (04/03/84)

From:  E. Howard Alt <alt@Sri-Tsc.ARPA>


Actually, /usr/ucb/u is linked to /usr/ucb/users.  The reason
/usr/ucb/w checks for u as the first character in argv[0] is to see if
the name is 'uptime' (too lazy to do a strcmp I guess).
/usr/ucb/uptime is linked to /usr/ucb/w.  u displays a list of users in
alpha order, uptime dispalys the first line of w (number of users, load
average, etc).

This is how it is set up on the 4.1 and 2.9 systems that I have seen.
I am pretty sure this is how 4.2 is set up.

							Howard.