hi,
which Unix/C function can i use to retrieve all group names with a particular group id?
The following C code prints out the group id number of a particular group name:
------------------------------------------------------------------------
#include <stdio.h>
#include <grp.h>
int... (3 Replies)
I have a file in the following format. Groups of data merge together and the group number is indicated above each group.
1
adrf
dfgr
dfg
2
dfgr
dfgr
3
dfef
dfr
fd
4
fgrt
fgr
fgg
5
fgrt
fgr (3 Replies)
I've this file and need to sort the data in each group
File would look like this ...
cat file1.txt
Reason : ABC
12345-0023
32123-5400
32442-5333
Reason : DEF
42523-3453
23345-3311
Reason : HIJ
454553-0001
I would like to sort each group on the last 4 fileds and print them... (11 Replies)
Hello,
When listing the file systems (using ls -ltr) , if the group names are longer the group name is getting truncated.
Can someone help with the script which would display the truncated group name?
I appreciate if someone could help in this regard. (1 Reply)
Hi All,
I have a pipe seperated file. I need to add the values in second and third columns with group by on first column.
MYFILE_28012012_1115|47|173.90
MYFILE_28012012_1115|4|0.00
MYFILE_28012012_1115|6|22.20
MYFILE_28012012_1116|47|173.90
MYFILE_28012012_1116|4|0.00... (3 Replies)
I'm trying to return only one row with the highest value for PCT_MAX_USED. Any suggestions?
When I add this code, I get the ORA-00937 error.
trunc(max(decode( kbytes_max, 0, 0, (kbytes_alloc/kbytes_max)*100))) pct_max_used
This is the original and returns all rows.
select (select... (3 Replies)
As part of some report generation, I've written a script to fetch the values from DB. But, unluckily, for certain Time ranges(1-9.99,10-19.99 etc), I don't have data in DB.
In such cases, I would like to write zero (0) instead of empty. The desired output will be exported to csv file.
... (1 Reply)
Discussion started by: kumar_karpuram
1 Replies
LEARN ABOUT MOJAVE
pwck
pwck(1M) System Administration Commands pwck(1M)NAME
pwck, grpck - password/group file checkers
SYNOPSIS
/usr/sbin/pwck [filename]
/usr/sbin/grpck [filename]
DESCRIPTION
pwck scans the password file and notes any inconsistencies. The checks include validation of the number of fields, login name, user ID,
group ID, and whether the login directory and the program-to-use-as-shell exist. The default password file is /etc/passwd.
grpck verifies all entries in the group file. This verification includes a check of the number of fields, group name, group ID, whether any
login names belong to more than NGROUPS_MAX groups, and that all login names appear in the password file. The default group file is
/etc/group.
All messages regarding inconsistent entries are placed on the stderr stream.
FILES
/etc/group
/etc/passwd
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO getpwent(3C), group(4), passwd(4), attributes(5)DIAGNOSTICS
Group entries in /etc/group with no login names are flagged.
Group file 'filename' is empty
The /etc/passwd or /etc/group file is an empty file.
cannot open file filename: No such file or directory
The /etc/passwd or /etc/group file does not exist.
NOTES
If no filename argument is given, grpck checks the local group file, /etc/group, and also makes sure that all login names encountered in
the checked group file are known to the system getpwent(3C) routine. This means that the login names may be supplied by a network name
service.
SunOS 5.10 20 Oct 2002 pwck(1M)