Author Topic: ifconfig -a Equivalent for HP-UX  (Read 452 times)

Offline scotbuff

  • Sys Admin
  • UNIX User
  • *****
  • Posts: 174
  • Karma: +2/-0
    • View Profile
    • Scott.Buffington.me
ifconfig -a Equivalent for HP-UX
« on: January 29, 2010, 07:42:10 am »
HP-UX lacks the -a flag for the ifconfig command which I have used on all other UNIX and Linux variants.  An alternative is to create an alias for the following command which outputs the equivalent.

for i in `netstat -rn |grep lan |cut -c55-59 |sort |uniq`; do ifconfig $i; done

Or another alternative using lanscan.

for i in `lanscan -i | awk '{print $1}'` ; do ifconfig $i ; done
« Last Edit: January 29, 2010, 07:48:10 am by scotbuff »

Offline showgirl

  • UNIX Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
  • UNIX newbie
    • View Profile
Re: ifconfig -a Equivalent for HP-UX
« Reply #1 on: February 16, 2010, 11:07:02 am »
I just want to say this is awesome.  I was not very familiar with HP-UX and missed the ifconfig -a command which I have built a habit of using. 

Offline scotbuff

  • Sys Admin
  • UNIX User
  • *****
  • Posts: 174
  • Karma: +2/-0
    • View Profile
    • Scott.Buffington.me
Re: ifconfig -a Equivalent for HP-UX
« Reply #2 on: February 16, 2010, 01:08:07 pm »
Those commands as aliases work pretty well, but netstat -in is a nice alternative as well.