Re: How do I get the user name from the uid?



On Fri, 10 Nov 2006 05:18:36 -0500, Chris F.A. Johnson wrote this:

On 2006-11-10, noi wrote:
On Thu, 09 Nov 2006 22:52:46 -0500, Chris F.A. Johnson wrote this:

On 2006-11-09, Jordan Abel wrote:
2006-11-09 <1163099433.267943.287320@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Timur Tabi wrote:
In the shell, how do I get the user name from the user ID (uid)?
Basically, I'm looking for the opposite of the 'id' command. I've
searched and searched, but I can't find the answer.

the id command can't do this?

No; id takes a USERNAME, not a UID.

I should have been more explicit in my reply

$ id -un

Where's the UID for which the OP wants to get the USERNAME?

Ok I understand and I'm corrected. .
.