Copyright © tutorialspoint.com
Syntax
Definition and UsageIn a list context, returns a list of fields, as extracted from the /etc/passwd file, based on the user name specified by EXPR. It's generally used like this: ($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell) = getpwnam ($user); In a scalar context, returns the numeric user ID. If you are trying to access the whole /etc/passwd file, you should use the getpwent function. If you want to access the details by user ID, use getpwuid. Return Value
ExampleTry out following example:
|
Copyright © tutorialspoint.com