Thank you for merging. The output looks sophisticated. About RES and RSS, I don't know which is better. As you know top command users RES and ps command uses RSS... Masatake YAMATO > On Thu, Mar 23, 2017 at 12:58:25PM +0100, Karel Zak wrote: >> On Tue, Mar 07, 2017 at 11:33:48AM +0900, Masatake YAMATO wrote: >> > bash-completion/Makemodule.am | 3 + >> > bash-completion/fincore | 25 +++++ >> > configure.ac | 4 + >> > misc-utils/Makemodule.am | 6 ++ >> > misc-utils/fincore.1 | 76 ++++++++++++++ >> > misc-utils/fincore.c | 209 +++++++++++++++++++++++++++++++++++++ >> > misc-utils/fincore_orig.c | 235 ++++++++++++++++++++++++++++++++++++++++++ >> > tests/commands.sh | 1 + >> > tests/expected/fincore/count | 62 +++++++++++ >> > tests/ts/fincore/count | 194 ++++++++++++++++++++++++++++++++++ >> > 10 files changed, 815 insertions(+) >> > create mode 100644 bash-completion/fincore >> > create mode 100644 misc-utils/fincore.1 >> > create mode 100644 misc-utils/fincore.c >> > create mode 100644 misc-utils/fincore_orig.c >> > create mode 100644 tests/expected/fincore/count >> > create mode 100755 tests/ts/fincore/count >> >> Merged (except fincore_orig.c). >> >> I'll very probably a little bit play with the output :-) It's like to >> have human readable sizes (10M) by default, align the numbers to the >> right (maybe use libsmartcols if more files specified). > > Implemented, changes: > > * errors are printed to stderr only, the output is not affected by errors > * use libsmartcols > * numbers aligned to the right > * add --bytes --raw --noheadings --json and --output <list> > * you can use $(fincore -o PAGES -nr /etc/passwd) to get only the number > > The default output is: > > $ fincore ~/Mail/Maildir/.notmuch/xapian/* > PAGES SIZE FILE > 0 0B /home/kzak/Mail/Maildir/.notmuch/xapian/flintlock > 1 28B /home/kzak/Mail/Maildir/.notmuch/xapian/iamchert > 17 67.4K /home/kzak/Mail/Maildir/.notmuch/xapian/position.baseA > 17 67.4K /home/kzak/Mail/Maildir/.notmuch/xapian/position.baseB > 1185 4.2G /home/kzak/Mail/Maildir/.notmuch/xapian/position.DB > 9 35.7K /home/kzak/Mail/Maildir/.notmuch/xapian/postlist.baseA > 9 35.7K /home/kzak/Mail/Maildir/.notmuch/xapian/postlist.baseB > 87831 2.2G /home/kzak/Mail/Maildir/.notmuch/xapian/postlist.DB > 1 208B /home/kzak/Mail/Maildir/.notmuch/xapian/record.baseA > 1 208B /home/kzak/Mail/Maildir/.notmuch/xapian/record.baseB > 66 11.5M /home/kzak/Mail/Maildir/.notmuch/xapian/record.DB > 7 27.6K /home/kzak/Mail/Maildir/.notmuch/xapian/termlist.baseA > 7 27.6K /home/kzak/Mail/Maildir/.notmuch/xapian/termlist.baseB > 1941 1.7G /home/kzak/Mail/Maildir/.notmuch/xapian/termlist.DB > > > I'd like to have also PAGES-IN-BYTES column to make it easy for > humans, but not sure how to call the column... "RES" or "RSS"? > > For example "343M" rather than "87831" (see above). > > Nice util, thanks! > > Karel > > -- > Karel Zak <kzak@xxxxxxxxxx> > http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html