Alfred M. Szmidt (ams) contributed a patch to the GNU file utilities
to cause 'ls --author -l' to output a file's author as well as its
owner and group.  While reviewing that patch, the topic came up: which
order should the author, owner, and group be listed?

For example, suppose a file 'foo' is owned by 'eggert', has author
'ams', and group 'staff'.  Here are some plausible outputs for the
command 'ls --author -l foo':

  -rw-rw-r--    1 eggert   staff    ams         15460 May 18 15:28 foo
  -rw-rw-r--    1 eggert   ams      staff       15460 May 18 15:28 foo
  -rw-rw-r--    1 ams      eggert   staff       15460 May 18 15:28 foo

Which of these outputs is preferable and why?

A similar issue arises with the chown command, e.g.,
which of the following should set the author to 'ams'?

  chown eggert:staff:ams foo
  chown eggert:ams:staff foo
  chown ams:eggert:staff foo

Presumably the chown-command order should be the same as the ls order.

In earlier private discussion on this topic, I made this point:

  The owner and author are uids whereas the group is a gid, and it
  seems to me that the uids should be kept together in the listing.

ams replied:

  Actually, wouldn't it be easier and more compatible to have it in
  the [owner:group:author] order?  If you specify an empty author
  field (owner::group) that becomes quite weird instead of using
  something along the lines of "owner:group" where one can quietly
  discard the author field.  You also change the group more often than
  the author of a file, which is only changed once, when the file is
  created.

I also asked:

  In practice, how common is it in the Hurd for the author to differ
  from the owner?  What are typical situations where this occurs?
  Perhaps if I understood this, I would see why it makes sense to put
  the info in a particular order.

And ams replied:

  No idea, as this feature hasn't been implemented yet it hasn't been
  used.  To be frank, I don't understand what use this field has, why
  not just put a "Written by:" tag at the top of the source
  code/document/whatever. Which one can then later view with `head'.
  The only time I can think that it has any real use is for binary
  files, like who compiled a specific binary.  You will have to ask
  Thomas Bushnell about this.

_______________________________________________
Help-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-hurd

Reply via email to