The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Linux question. by techi8702006-09-14 14:36:33
  Oh, and here is a utility to find your ip: by Tars_Tarkas 2006-11-19 12:55:59
I wrote this some while ago. Finds the ip address of your machine (or any other host you want). Sure, ifconfig does this, and host/dig can also do so, but I wanted something simple that did just this one thing.

Just compile it like so:
#>gcc -O -Wall -o hostip hostip.c
and then copy the resulting executable (hostip) to /usr/bin or some such place.

#>hostip -h
gives a usage summary, without any options prints your host ip to stdout.
--
Tars, Journeyman Sourcerer.
[ Reply ]
    A quick glance suggests by sem2006-09-14 15:03:03
      Hm, yes, true that. (n/t) by Tars_Tarkas2006-09-14 15:09:01
    Just to let you know... by FST7772006-09-14 15:41:56
      It's really just a gethostbyname wrapper... by Tars_Tarkas2006-09-14 15:47:12
        I SAID I KNOW! by FST7772006-09-15 01:44:48

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)