2

I found that I can save man page into ps format:

man -t man > file.ps

or to pdf:

man -t man | ps2pdf - file.pdf

Apart from the man page itself, the export includes man version, page numbers and date.

2.6.2    2012-06-18     1

How can I remove the date ? How can I configure what is added ?

  • 1
    You could edit the troff source by hand before piping it to postscript. – Faheem Mitha Nov 26 '17 at 16:11
2

The date is set in the source code for the man page

-bash-4.2$ man -w man
/usr/share/man/man1/man.1.gz
-bash-4.2$ zcat $(man -w man) | fgrep 2012
.TH MAN 1 "2012-09-17" "2.6.3" "Manual pager utils"
-bash-4.2$ 

Not portably, as OpenBSD for example instead places the date in .Dd

$ man -w man
/usr/share/man/man1/man.1
/usr/share/man/man7/man.7
$ grep 2017 $(man -w 1 man)
.\"     $OpenBSD: man.1,v 1.30 2017/08/19 22:05:22 schwarze Exp $
.\" Copyright (c) 2010, 2011, 2014-2017 Ingo Schwarze <schwarze@openbsd.org>
.Dd $Mdocdate: August 19 2017 $
$ 

In either case your options are limited; either edit the source to remove or change the date, or write your own troff parser that does the same.

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.