not sure if this is the best way, but i'm attempting the following: cmd = "find " + dir + " " + "-type f -name \"*.ajt\" -amin +" + time + " " + "| wc -l | awk \'{print $1}\'" files = os.system(cmd) print files however as some might predict, the output of this program isn't what I expect.. ./test2.py 3 0 thoughts appreciated. ajt.