Locate Firefox Cache - Python Code
Here I share my python code to locate firefox cache directory.
It will work on Linux (*nix). To use it in windows with minimum modification, you need to install UnxUtil in your machine. Please visit http://speed-dev.blogspot.com/2008/03/unxutil-run-unix-linux-command-in.html to know more about UnxUtil.
# program to locate firefox cache directory in Linux
from subprocess import Popen, PIPE
name = raw_input('Enter the top-level direcotry ( example: /home ): ')
li = Popen(['find', name, '-iname', 'cache'], stdout=PIPE).stdout.read().split('\n')
flag = 1
for item in li:
if item.find('firefox') != -1:
print 'Cache Directory: ', item
flag = 0
break
if flag:
for item in li:
if item.find('mozilla') != -1:
print 'Cache Directory: ', item
break
It will work on Linux (*nix). To use it in windows with minimum modification, you need to install UnxUtil in your machine. Please visit http://speed-dev.blogspot.com/2008/03/unxutil-run-unix-linux-command-in.html to know more about UnxUtil.
Comments
To write a python script to increase view count in youtube will take some time. Because of my laziness I am not going after it now, unless someone sponsors me :)