You are not logged in.

#1 2012-12-11 15:12:15

adam777
Member
Registered: 2012-05-28
Posts: 161

[Solved] Efficiently find updated man pages

Hello all,
At times a package update will introduce changes to the way a program is behaving, that a user might want to know about.
For example, the latest mplayer2 update introduced a new video output driver (gl3).
I realized this feature was added while looking for information on something else in the man page.

Under the assumption that when such a change is introduced the man page is updated accordingly, is there a way to efficiently find which man pages were updated?
Ideally, a list can be compiled automatically after an update (so in the above case I would realize the man page "mplayer" was updated).
Even a simple script to find updated man pages from previous (hour, day, whatever) is perfectly fine.

Thanks in advance, Adam.

PS.
I do realize it is probably not the best practice to install updates without reading about it first smile

Last edited by adam777 (2012-12-12 06:16:03)

Offline

#2 2012-12-11 16:41:07

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,041

Re: [Solved] Efficiently find updated man pages

List the 20 most recently modified man pages:

ls -lt /usr/share/man/man{0,1,2,3,4,5,6,7,8} | head -n20 | sed -e "s/.* \(.*\)\.\([0-8][pmx]\?\)\.gz/\1 (\2)/g" 

List the man pages modified today:

ls -lt /usr/share/man/man{0,1,2,3,4,5,6,7,8} | grep "$(date +"%b %d")"  | sed -e "s/.* \(.*\)\.\([0-8][pmx]\?\)\.gz/\1 (\2)/g" 

Something like that...

Last edited by jakobcreutzfeldt (2012-12-11 16:51:52)

Offline

#3 2012-12-11 17:13:33

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved] Efficiently find updated man pages

Or better yet, just use find. Parsing ls is evil for way too many reasons.

find /usr/share/man -type f -mtime -2

where -2 means "2 days ago". This isn't really going to be useful when you consider that packages are going to introduce new manpages regardless of whether or not they changed. If you care about a project, I suggest reading the changelog for releases to get a better idea of what's new/different rather than blindly searching manpages looking for what may or may not be new options.

Offline

#4 2012-12-12 00:38:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Efficiently find updated man pages

falconindy wrote:

Or better yet, just use find. Parsing ls is evil for way too many reasons.

http://mywiki.wooledge.org/ParsingLs :-)

Some packages provide little info, sometimes it's hidden in e.g. INSTALL file, e.g. https://aur.archlinux.org/packages/movgrab/ (see comments) so it's not a universal way to find new stuff, by any means.
Asking upstream to provide a nice changelog would be best.

Offline

#5 2012-12-12 06:15:51

adam777
Member
Registered: 2012-05-28
Posts: 161

Re: [Solved] Efficiently find updated man pages

Thank all for the hints, I think I can take it from here.

Offline

Board footer

Powered by FluxBB