Sponsored Content
Full Discussion: getting computer name
Top Forums Programming getting computer name Post 47695 by S.P.Prasad on Tuesday 17th of February 2004 06:45:55 AM
Old 02-17-2004
The gethostbyaddr subroutine returns a pointer to a structure of type hostent. Its members specify data obtained from either the local /etc/hosts file or one of the files distributed by DNS. To determine which file or files to search, and in which order, the system uses the switches as defined.

As the routine reads /etc/hosts file we should use endhostent() routine to close the /etc/hosts file.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

xwindow on old computer

hello at first sorry for my english... i know it isn't good but i hope you can understand me i want to install xwindow on my old pentium133MHz, 49MB ram memory, graphic card - stb horizon64 1MB (with old monochromatic monitor - horizontal 30.6-36.0, vertical 50-90) all this under redhat6.1...... (1 Reply)
Discussion started by: pgas
1 Replies

2. UNIX for Advanced & Expert Users

who - PC Computer name

Does anyone know of a way of identifying the PC / client name rather than IP address via who or some other AIX command (5.3). (4 Replies)
Discussion started by: gefa
4 Replies

3. UNIX for Dummies Questions & Answers

Computer Does NOT Ping

Hi, I cannot ping my IP address on the following settings and was wondering if anyone knows a solution to make the computer pingable. Windows XP Media Centre Edition Service Pack 3 Wireless Router DLINK DSL-G604Tv2 Wireless Connection Windows Firewall - disabled completely by "stopped in... (2 Replies)
Discussion started by: timmc10
2 Replies

4. What is on Your Mind?

How Many hours on Computer?

How many hours you spend on Computer in a day??? (10 Replies)
Discussion started by: malcomex999
10 Replies

5. What is on Your Mind?

What was your first computer?

Hey, the What Do You Do for a Living thread got me thinking about this. My first "computer" was a Timex Sinclair that I built from a kit. I also spent many hours painstakingly programming a Commodore Vic20 to display graphics and sound (and save them on that slooooow tape drive). My first "real"... (26 Replies)
Discussion started by: dday
26 Replies

6. UNIX for Dummies Questions & Answers

Can't shutdown the computer

i cannot shutdown my computer through GUI or CLI when i put the command shutdown -P/-r nowor press the shutdown button it goes to the login prompt and stays like that afterwards, so i press CTRL+ALT+delete (which works) but that only restarts it and closes processes like winbind and apache ... (6 Replies)
Discussion started by: mi117
6 Replies

7. UNIX for Dummies Questions & Answers

Please help my computer has been compromised

Hi everyone, I hope I am posting in the right spot and I really need some help. I am going through a horrible divorce and I am afraid that my husband has compromised . He set up my mac computer and router and for my job set up remote access for me. I caught him cheating on me and I think he... (6 Replies)
Discussion started by: kk243665
6 Replies
machid(1)							   User Commands							 machid(1)

NAME
machid, sun, iAPX286, i286, i386, i486, i860, pdp11, sparc, u3b, u3b2, u3b5, u3b15, vax, u370 - get processor type truth value SYNOPSIS
sun iAPX286 i386 pdp11 sparc u3b u3b2 u3b5 u3b15 vax u370 DESCRIPTION
The following commands will return a true value (exit code of 0) if you are using an instruction set that the command name indicates. sun True if you are on a Sun system. iAPX286 True if you are on a computer using an iAPX286 processor. i386 True if you are on a computer using an iAPX386 processor. pdp11 True if you are on a PDP-11/45tm or PDP-11/70tm. sparc True if you are on a computer using a SPARC-family processor. u3b True if you are on a 3B20 computer. u3b2 True if you are on a 3B2 computer. u3b5 True if you are on a 3B5 computer. u3b15 True if you are on a 3B15 computer. vax True if you are on a VAX-11/750tm or VAX-11/780tm. u370 True if you are on an IBM(R) System/370tm computer. The commands that do not apply will return a false (non-zero) value. These commands are often used within makefiles (see make(1S)) and shell scripts (see sh(1)) to increase portability. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
make(1S), sh(1), test(1), true(1), uname(1), attributes(5) NOTES
The machid family of commands is obsolete. Use uname -p and uname -m instead. SunOS 5.11 5 Jul 1990 machid(1)
All times are GMT -4. The time now is 09:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy