How to list numeric user and group IDs ?

UNIX Command

$ls a1.txt a2.txt $ls -n total 4 -rw-r--r-- 1 1000 1000 0 Feb 19 22:30 a1.txt -rw-r--r-- 1 1000 1000 2 Feb 19 22:31 a2.txt $id a1.txt id: a1.txt: No such user $id jeffrin uid=1000(jeffrin) gid=1000(jeffrin) groups=1000(jeffrin),29(audio),33(www-data),1001(wireshark),119(mysql) $

Unix Explanation

-n, --numeric-uid-gid like -l, but list numeric user and group IDs

Theory Drop

Unix-like operating systems identify users within the kernel by an unsigned integer value called a user identifier, often abbreviated to UID or User ID. The range of UID values varies amongst different systems; at the very least, a UID represents a 15-bit integer, ranging between 0 and 32767, with the following restrictions: The superuser must always have a UID of zero (0). The user "nobody" traditionally got the largest possible UID (as the opposite of the superuser): 32767. More recently, systems have assigned the user a UID in the system range (1-100, see below) or in the range 100530-100535. Convention reserves UIDs from 1 to 100 for system use; some manuals recommend reserving UIDs from 101 up to 499 (Red Hat Enterprise Linux) or even up to 999 (Debian) as well. source : http://en.wikipedia.org/wiki/User_identifier

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s