Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux filter specific group with cat and grep

cat /etc/group

cat /etc/groups | grep <groupname>
  
# Example:
cat /etc/groups | grep sudo
# Output
sudo:x:27:<user1>, <user2>, <user3>...

# sudo : group name
# x : password (encrypted for security reasons)
# 27 : could be another number, represents group ID
# list of users in group
Source by www.cyberciti.biz #
 
PREVIOUS NEXT
Tagged: #linux #filter #specific #group #cat #grep
ADD COMMENT
Topic
Name
2+1 =