mapping of uid and user
i am trying to get the owner (name) of a file using stat() system call. But i am geting uid (uid_t) which is an integer value. How to get the username from that integer??
|
Try %U:
Code:
$ stat --format "%U" ls_uniq.sh Code:
man stat HMW |
Assuming you're talking about a C program, you can try getpwuid(3) to find a user name given a uid.
|
All times are GMT -5. The time now is 08:05 AM. |