i need to find the host name of a UNIX host whose IP is known with out login to that UNIX host
相关问题
- Why should we check WIFEXITED after wait in order
- softlinks atime and mtime modification
- UNIX Bash - Removing double quotes from specific s
- Get unexpanded argument from bash command line
- Include and Execute EXE in C# Command Line App
相关文章
- Making new files automatically executable?
- How to resolve hostname to an ip address in node j
- Reverse four length of letters with sed in unix
- Compile and build with single command line Java (L
- Extracting columns from text file using Perl one-l
- Problem with piping commands in C
- How to update command line output?
- How to execute another python script from your scr
Use nslookup
Another NS lookup utility that can be used for reversed lookup is
dig
with the-x
option:or
Quoting from the dig manpage:
You can use traceroute command as well.
http://linux.die.net/man/8/traceroute
just use the traceroute it will show you the routing path with host names (IPs resolved)
In most cases, traceroute command works fine. nslookup and host commands may fail.
if you just need the name, no additional info, add [0] at the end:
The other answers here are correct - use reverse DNS lookups. If you want to do it via a scripting language (Python, Perl) you could use the gethostbyaddr API.