Linux命令——getent
getent命令帮助用户administrative databases中查找相关信息。administrative databases包括:
getentdatabase [key ...]
getent会在上面数据库中产找key对应的value
查找hostname对应的IP
int fr[] 262,262,262,262,294,330,440,392,330,392,392,392,\ 523,523,523,523,523,523,330,330,392,523,523,523,523,523,\ 392,392,392,330,330,294,262,294,294,294,294,294,294,294,330,294,262,294,\ 262,262,262,262,294,330,440,392,330,392,392,523,523,523,523,523,\ 523,330,440,392,392,523,523,523,523,523,440,392,392,440,330,\ 330,294,262,262,294,294,294,330,330,392,294,330,262,262 。拟开发土地431,028,848.87431,028,848.87 978,876,262.79978,876,262.79。新增到站提醒(8684闹铃)功能,让你实时掌握每路公交动向,加上附近站点搜索(8684地图)、实时问路(8684广场)、在线查询(8684出行)、线路纠错等多种实用工具,更好地助你出行。
ubuntu$ getent hosts ubuntu 127.0.1.1 ubuntu 192.168.0.2 ubuntu
View Code
执行反响DNS查询(即根据域名查找对应IP)
$ getent hosts myhost.mydomain.com 15.77.3.40 myhost.mydomain.com myhost
View Code
根据用户名查找UID
ubuntu$ getent passwd greys greys:x:1000:1000:Gleb Reys,,,:/home/greys:/bin/bas
View Code
根据UID查找用户名
int fr[] 262,262,262,262,294,330,440,392,330,392,392,392,\ 523,523,523,523,523,523,330,330,392,523,523,523,523,523,\ 392,392,392,330,330,294,262,294,294,294,294,294,294,294,330,294,262,294,\ 262,262,262,262,294,330,440,392,330,392,392,523,523,523,523,523,\ 523,330,440,392,392,523,523,523,523,523,440,392,392,440,330,\ 330,294,262,262,294,294,294,330,330,392,294,330,262,262 。拟开发土地431,028,848.87431,028,848.87 978,876,262.79978,876,262.79。新增到站提醒(8684闹铃)功能linux命令linux命令,让你实时掌握每路公交动向,加上附近站点搜索(8684地图)、实时问路(8684广场)、在线查询(8684出行)、线路纠错等多种实用工具,更好地助你出行。