📄 getpwwho.3
字号:
From James.Gosling@CMU-VLSI@CMU-10A Thu Sep 10 07:17:42 1981Date: 10 Sep 1981 10:08:10-EDTFrom: James.Gosling at CMU-VLSI at CMU-10AReply-To: James.Gosling at CMU-10ATo: IngVAX.eric@BerkeleySubject: getpwwho.1Status: R.TH GETPWWHO 3 5/9/80.CM 2.SH "NAME"getpwwho \- get password file entry using liberal name matching..SH "SYNOPSIS".B#include <pwd.h>.br.Bextern struct gecos *_gecos;.sp.Bstruct passwd *getpwwho(name).br.Bchar *name;.sp.Bstruct passwd *getpwambig();.SH "DESCRIPTION".IGetpwwhois much like.IR getpwnam (3),except that it is much moreliberal about the names that it will match..INamemay be a full login nameor it may be the unique abbreviation of a persons last name, or itmay be a unique abbreviation of a persons firstand last name..spThe subroutine.Igetpwambigmay be used to iterate through all thematches for the name given to the last call to.IR getpwwho .If.Igetpwwhoreturns -1 then name does not uniquely determinea person, a program can then print out all the names that matchby repeatedly calling.Igetpwambiguntil.Igetpwambigreturns 0..spBoth.Igetpwwhoand.Igetpwambigreturn with.I_gecospointing toa.Igecosstructure that results from parsing the GECOS field ofthe.Ipasswdentry that is returned..SH "FILES"/etc/passwd The password file..SH "SEE ALSO"getpwnam(3),parsgecos(3).SH "EXAMPLE".Bgetpwwho("harry bovik");.br.Bgetpwwho("bovik");.br.Bgetpwwho("H Bovik");.br.Bgetpwwho("hb");.RSAll of these match the person "Harry Q. Bovik",who has "hb" as his login name..RE.SH "DIAGNOSTICS".IGetpwwhoreturn 0 if the person isn't found, -1 if the nameis ambiguous.In the case that the name is ambiguous a program caniterate through all the possibilities by using.IR getpwambig ..SH "HISTORY".TP09-May-80 James Gosling (jag) at Carnegie-Mellon UniversityCreated.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -