Post thumbnail of Install a single file from a package without installing the RPM
14 July 2011
Continue reading Install a single file from a package without installing the RPM

Install a single file from a package without installing the RPM

You don’t need to install an RPM package just to get to the files. This can be especially useful if you’re looking for the default configuration files or docs from a package. You may have the package already installed and don’t want to reinstall it. It’s not pretty, and I wish rpm and yum provided a prettier method of extracting a file, but it works.

Post thumbnail of Tail a file in Python
20 October 2009
Continue reading Tail a file in Python

Tail a file in Python

Tail a file in Python

def tail( f, window=20 ):
f.seek( 0, 2 )
bytes= f.tell()
size= window
block= -1
while size > 0 and bytes+block*1024 > 0:

Post thumbnail of Python script to cut some lines from the top a file
9 October 2009
Continue reading Python script to cut some lines from the top a file

Python script to cut some lines from the top a file

Hmm… I changed it to cut from the top and bottom:

Powered by Wordpress   |   Lunated designed by ZenVerse