检查Linux中的现有组 [英] Check existing group in linux
本文介绍了检查Linux中的现有组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好所有访客
我想写一个shell脚本.
我的目的是我要检查系统中的现有组.
我不知道如何检查现有组.
请有人帮助我如何检查系统中的现有组吗?
Hi all visitors
i want to write one shell script.
my purpose is i want to check existing group in system.
i dont know how to check existing group.
Please anybody help me how to check existing group in system?
Thanks
推荐答案
使用cat /etc/group
列出您的组文件中的条目,并结合使用awk
和其他命令来检查是否存在特定的条目.查看各种手册页以获取更多帮助.
Usecat /etc/group
to list the entries in your group file, and a combination ofawk
and other commands to check whether a particular one exists. Look at the various man pages for further help.
这篇关于检查Linux中的现有组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文