Saturday, September 15, 2012

Grep in pdf file for a certain word

find . -name '*.pdf' -exec pdftotext {} - \; | grep -rn "test"

find . -name "*.pdf" -print0| while read -d $'' file; do co=$(pdftotext -q "$file" - |grep -crn "test"); if [ $co -ne 0 ]; then echo $co - "$file" ; fi ; done

Wednesday, September 12, 2012

uninstall a firefox plugin

http://askubuntu.com/questions/150095/how-to-uninstall-a-firefox-plugin


Manually uninstalling a plugin

If you can't use an uninstaller program to remove a plugin, you can remove it manually:

In the Location bar, type about:config and press Enter.

The about:config "This might void your warranty!" warning page may appear. Click I'll be careful, I promise!, to continue to the about:config page.
Search for the preference: plugin.expose_full_path.

Double-click on the plugin.expose_full_path preference in the list to change the value to true.

Enter about:plugins into the Location bar to display the About Plugins page.

Each entry in the About Plugins page will have "File name:" followed by a path. Use Windows Explorer to navigateNavigate to the folder shown for the plugin you want to remove.

Rename the file to something other than its normal name - e.g. npswf32 becomes Xnpswf32

Double-click on the plugin.expose_full_path preference in the list on the about:config page to change the value back to false to avoid exposing the plugin path to websites.

Tuesday, September 11, 2012

Download a web site using wget

wget -r --level=0 -convert-links --page-requisites --no-parent <URL>
httrack <URL>