From owner-freebsd-questions Wed Jul 31 11:27:50 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9234F37B400 for ; Wed, 31 Jul 2002 11:27:45 -0700 (PDT) Received: from russian-caravan.cloud9.net (russian-caravan.cloud9.net [168.100.1.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40E42444C7 for ; Wed, 31 Jul 2002 11:18:52 -0700 (PDT) (envelope-from Hostmaster@Video2Video.Com) Received: from earl-grey.cloud9.net (earl-grey.cloud9.net [168.100.1.1]) by russian-caravan.cloud9.net (Postfix) with ESMTP id BEC5728D78; Wed, 31 Jul 2002 14:16:17 -0400 (EDT) Date: Wed, 31 Jul 2002 14:16:17 -0400 (EDT) From: Peter Leftwich X-X-Sender: To: Cc: FreeBSD LIST Subject: Re: Good script to get the IP address from u logon on freebsd In-Reply-To: <038d01c238c2$1bd526c0$7d05a8c0@fred> Message-ID: <20020731141202.M44895-100000@earl-grey.cloud9.net> Organization: Video2Video Services - http://Www.Video2Video.Com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 31 Jul 2002 fred@timogen.com wrote: > Hi, I have a freebsd box, Can someone execute a scripts to print the IPAddress where she is from when he logon this machine? > Regards, > Fred Zhang Try `arp -a` for your own IP address, or the `w` command to see what IP address people are logging onto your box from (telnetting or ssh'ing in). You could also just type `last -5` or however many you want. The `w -n` command will stop trying to resolve IP addresses to names, but for some reason I can't get it to forcibly -only- show IPs; My DHCP hostname is long and is getting truncated (chopped short). -- Peter Leftwich President & Founder Video2Video Services Box 13692, La Jolla, CA, 92039 USA +1-413-403-9555 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message