Linux命令——getent
getent命令幫助用戶administrative databases中查找相關信息。administrative databases包括:
getentdatabase [key ...]
getent會在上面數(shù)據(jù)庫中產(chǎn)找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 。擬開發(fā)土地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
執(zhí)行反響DNS查詢(即根據(jù)域名查找對應IP)
$ getent hosts myhost.mydomain.com 15.77.3.40 myhost.mydomain.com myhost
View Code
根據(jù)用戶名查找UID
ubuntu$ getent passwd greys greys:x:1000:1000:Gleb Reys,,,:/home/greys:/bin/bas
View Code
根據(jù)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 。擬開發(fā)土地431,028,848.87431,028,848.87 978,876,262.79978,876,262.79。新增到站提醒(8684鬧鈴)功能linux命令linux命令,讓你實時掌握每路公交動向,加上附近站點搜索(8684地圖)、實時問路(8684廣場)、在線查詢(8684出行)、線路糾錯等多種實用工具,更好地助你出行。