Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2002 13:36:13 -0600
From:      jacks@sage-american.com
To:        Mark Drayton <mark.drayton@izrsolutions.com>, Lance Bland <lbland@vvi.com>
Cc:        adrian kok <adriankok2000@yahoo.com.hk>, questions@FreeBSD.ORG
Subject:   Re: number of users
Message-ID:  <3.0.5.32.20020125133613.01831ca0@mail.sage-american.com>
In-Reply-To: <20020125192444.A3916@drex.staff.izr.com>
References:  <0C288440-11C8-11D6-A67C-0030659A531A@vvi.com> <20020125190013.23955.qmail@web21210.mail.yahoo.com> <0C288440-11C8-11D6-A67C-0030659A531A@vvi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
...or if you just want a summary of how many users there are allowed on the
system, I have a script.

At 07:24 PM 1.25.2002 +0000, Mark Drayton wrote:
>Lance Bland (lbland@vvi.com) wrote:
>
>[..snip..]
>
>> If you just want to know how many are logged in then "finger" might
>> work.  or you might want to use "last", or "ac -p"
>
>Original poster: these methods will show how many users are currently
>logged in. The following will tell you have many user accounts you have
>with a UID > 1000 (ie non-system accounts):
>
>grep -v '^#' /etc/passwd | awk -F: '{ if ($3 > 1000) print $0 }' | wc -l
>
>eg:
>
>=== mark@mir:~$ grep -v '^#' /etc/passwd | awk -F: '{ if ($3 > 1000) print
$0 }' | wc -l
>       5
>
>Cheers,
>
>-- 
>
>Mark Drayton
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-questions" in the body of the message
>
>

Best regards,
Jack L. Stone,
Server Admin

===================================================
Sage-American 
http://www.sage-american.com
jacks@sage-american.com

"My center is giving way, my right is in retreat;
....situation excellent! ....I shall attack!"
===================================================

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.20020125133613.01831ca0>