Red Hat Bugzilla – Bug 57105
mpage -H prints ctime of text file but should print mtime
Last modified: 2008-05-01 11:38:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.9-12 i586)
Description of problem:
This is a feature since the man page clearly says that -H uses the file
time. However, the change time is the Wrong Time to use, since it is
any file attributes are changed. For instance, if the file is backed up
tar --atime-preserve, the ctime of the file becomes the time when the
done. Don't try to tell me this isn't BROKEN! Also, pr uses mtime (as
and the man page sort of implies that mpage should behave like pr, since
this is what
it uses by default under -p.
Steps to Reproduce:
1. Create a short text file (or use an old one lying around). Assume it is
2. Change its ctime without changing mtime:
chmod +x foo.txt ; chmod -x foo.txt
3. Look at ctime and mtime; they will be different.
ls -lc foo.txt ; ls -l foo.txt
4. Format the file using mpage and give output a header
mpage -H1 foo.txt | lpr
Actual Results: The time in the output header is ctime, not mtime.
Expected Results: Since mpage conforms to its man page, the expected
results after reading the man
page are the same as the actual results. However, the expected (and
before reading the man page were that the time in the output header should
I did not find any way to tell mpage to select mtime as an alternative to
The only workaround is manually put the date in the -h header, or use -p
which unfortunately also puts irrelevant "pr -l66 -w80" in the header.
I would be happy with an additional command-line option to select mtime.
Created attachment 41370 [details]
patches for text.c and mpage.1 to fix feature and documentation of it
I agree. Fixed in mpage-2.5.2-2.