Permission Denied for apropos command I'm trying to list the contents of the whole apropos (makewhatis) database with the following command but I keep getting Permission denied.

sudo -s apropos . &gt; touch thedatabase

-bash: touch: Permission denied



sudo -s apropos . &gt; thedirectory

thedatabase: Permission denied



apropos . &gt; touch thedatabase



All of these result in some form of Permission Denied. How do I get around this or what is the more elegant way of doing this?
I'm not sure how to do what you are asking.  Looking into that now, but I know how to get around the permissions problems you are having with sudo.

Your syntax is wrong for sudo, the shell redirection ">" is happening without elevated privelleges.  Try wrapping in quotes like this:

sudo -s 'apropos . &gt; touch thedatabase'