Thread:Project:Support desk/Delete unused images

Hello, I am trying to delete unused images from my wiki. I found the following code on a forum somewhere but I cannot get it to work:

lynx -dump http://wiki_site/wiki/index.php/Special:UnusedFiles | grep "/File:" | gawk '{print $2}' | sort | uniq | gawk -F\File '{print "File"$2}' > ./delete_files php /var/www/html/wiki/maintenance/deleteBatch.php ./delete_files

It keeps saying that "lynx" and "gawk" commands were nto found. I get how to use the deleteBatch.php script. What I really need is an easy way to get a list of all the files that show up in "Special:UnusedFiles".

Any help is appreciated.