Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,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 whomever posted them. This site is not responsible for what they say.
10.5: View the new 'man' pages on upgraded systems
Authored by: sEEKz on Thu, Dec 13 2007 at 9:19AM PST
There is an issue. Especially if you use a case sensitive filesystem. It seems that in Tiger several files start with an uppercase letter. Whereas in Leopard all the .gz files are lowercase. For example:

larik@hustler mann $ ls -al widget.n.gz Widget.n 
-rw-r--r--  1 root  wheel  3568 Dec 13 17:39 Widget.n
-rw-r--r--  1 root  wheel  2528 Dec 13 17:39 widget.n.gz
The following code can be used, just to remove all files which have an .gz equivalent. (You don't need the Leopard install DVD). Backup first and use at your own risk.

for f in $(find /usr/share/man -type f \! -iname '*.gz'); do
   lc=`echo $f | tr "[:upper:]" "[:lower:]"`
   ( [ -e ${f}.gz ] || [ -e ${lc}.gz ] ) && rm $f 
done


[ Reply to This | # ]