id: Riding the coattails of coreutils

I wasn’t going to include id, because it doesn’t really do anything. There. I said it.

But id keeps good company, and just about everything that comes out of coreutils is a winner.

So this time I’ll run through everything I could make id do. Don’t worry, this will be short.

Just by itself, id does this:

uid=1000(kmandla) gid=100(users) groups=100(users),4(adm),10(wheel),91(video),92(audio),93(optical),95(storage)

which is about the most you’ll get out of it.

You can pare down what id displays, which is where most of the flags come in. For example, id -g

100

which may or may not be helpful. 🙄 Capitalize that to -G, and get

100 4 10 91 92 93 95

more that may or may not be helpful. Those numbers, as I hope you figured out already, relate to the groups you saw in the first example.

The -n flag is what changes things considerably, but not by itself. Try -un, -gn and -Gn:

kmandla
users
users adm wheel video audio optical storage

And believe it or not, that’s about all id does, that I can tell. The last time I used id in earnest was to make sure I was in the right group to use a piece of hardware that wasn’t responding.

And … that’s all I can think of to say. 😐

Advertisements