Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
拜托,任何人都可以帮助我获取登录名中第一个字符为 'g' 的所有用户吗?
cat /etc/passwd | cut -d ":" -f 1 | egrep "^g"
足够?
Grep '^g*' /etc/passwd
你可以改变/etc/passwd任何你想要的路径
/etc/passwd