tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mtree output sorting

I resently changed "mtree -C" to sort its output into the same order
used by "mtree -c".  The sort order is that used by strcmp(), except
that directories sort after non-directories.

There are two issues for which I would like comments:

1) find(1) also has a sort option, "find -s", but that uses strcoll(3),
   not strcmp(3).  Should mtree use strcoll(3) for sorting?

2) The problems in PR 24457 become worse when the output is sorted,
   as documented in PR 41155.  To address this, I would like to make
   sorting optional for "mtree -C".  I propose adding a "-S" option to
   enable sorting.  Is such a new option acceptable?  (Sorted output
   from "mtree -c" would remain non-optional.)

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index