0

When using chgrp or chown I see zero used quite frequently as the named group or user, instead of root.

Is there a preference for either?

And in what use case is the numeric arg preferable?

1
  • Maybe not for root, but in a use case like described here, where the same UID (numeric) should match different users (by name), an admin might find it easier to work with numbers than names.
    – FelixJN
    Jan 5 at 16:35
2

We know that root is always 0, but for other users we don't know there uid.

In the old days memory and punch-cards were expensive, 0 is 3 less characters than root. It was encouraged to make programs small, to save memory, but at the expense of readability.

Now memory is cheap. It is better to focus on readability. People are still being taught old habits, because the teachers don't know why we did it that way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.