For filetype recognition, you'll get the best results by installing ``python-magic``: sudo apt-get install python-magic