# getent passwd 1000
cecgw:x:1000:1000:cecgw,,,:/home/cecgw:/bin/bash
# getent passwd 1000|cut -d : -f 1
cecgw
# getent passwd 1000|awk -F : '{print $1}'
cecgw
# getent passwd 1000
cecgw:x:1000:1000:cecgw,,,:/home/cecgw:/bin/bash
# getent passwd 1000|cut -d : -f 1
cecgw
# getent passwd 1000|awk -F : '{print $1}'
cecgw
本文标题:shell技巧:通过uid获取用户名
本文链接:https://www.haomeiwen.com/subject/xcksnxtx.html
网友评论