|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Finding the group owner for a file
How would I find out who the group openers is of a file? For example: Code:
> ls -l myfile -rwxr-xr-x 1 myronp hawks 20125 Oct 20 20:50 myfile How do I return just hawks. I could do this with a series of cut or awk, but is there a more direct way. The ls -g is better, but still has all the permissions, size info: Code:
> ls -g sweepftp -rwxr-xr-x 1 lawson 20125 Oct 20 20:50 sweepftp There must be a better way to get the group of a file. Last edited by Scrutinizer; 02-08-2013 at 01:08 PM.. Reason: code tags |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
If your system has a
stat utility,
man 1 stat should tell you all you need to know. Specifically, for customized output, with GNU stat see the
-c option; with BSD stat, see the
-f option.
Regards, Alister |
| Sponsored Links | ||
|
![]() |
| Tags |
| file, group, owner |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Finding the Group Owner Name | mansahr143 | UNIX for Dummies Questions & Answers | 4 | 11-11-2012 05:50 PM |
| Creating a file where the owner and group is not root | jdilts | UNIX for Dummies Questions & Answers | 20 | 06-09-2012 01:12 AM |
| How to set the name of the group and the owner while creation of the file? | nehak | UNIX for Dummies Questions & Answers | 2 | 04-23-2008 08:26 AM |
| File Owner/Group through Shell Script | rahulrathod | Shell Programming and Scripting | 1 | 02-26-2008 01:45 PM |
| Can't change owner and group of a linux file | bache_gowda | UNIX for Dummies Questions & Answers | 7 | 06-26-2003 10:08 PM |
|
|