Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.5: View the new 'man' pages on upgraded systems' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: View the new 'man' pages on upgraded systems
Authored by: yuji on Dec 13, '07 09:07:14AM
Here's my version of the perl script. Save it in a file (say, cd to /usr/share/man, and sudo perl It just backs up the old man pages in /usr/share/man/duplicates/ , and never removes it.

use File::stat;
mkdir "duplicates" unless -e "duplicates";
for $dir (<man*>){
	unless(-e "duplicates/$dir"){
		mkdir "duplicates/$dir";
		if(-e "$_.gz"){
			if($st->mtime < $gz->mtime ){
				print "$_ older than $_.gz \n";
				rename $_, "duplicates/$_";

[ Reply to This | # ]