Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic ls-l question, show files owned by specific group 2

Status
Not open for further replies.

gsgb1

Programmer
Jul 31, 2004
21
CA
How can I select files when I do ls -l for specific group?
I want to select only grp1 files (file1.sh and file2.sh)

-rwxrwxrwx 1 own1 grp1 98 Oct 10 11:57 file1.sh
-rwxrwxrwx 1 own1 grp1 98 Oct 11 11:52 file2.sh
-rwxrwxrwx 1 own1 grp2 98 Oct 12 10:45 file3.sh
-rwxrwxrwx 1 own1 grp3 98 Oct 15 10:40 file4.sh

Thanks.
 
Either man grep or man find (the -group and -prune primaries).

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Try:
Code:
find . -group grp1 -ls


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Thanks guys, And how about if its owner instead of group?
 
Either man grep or man find (the -user and -prune primaries).

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
> And how about if its owner instead of group?

You should really be able to figure that out on your own with the information given.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top