On Jan 31, 1:06 pm, John Bokma <j...@castleamber.com> wrote: > Kyp <k...@stsci.edu> writes: > > Is there a way to get the first X # of files from a dir with lots of > > files, that does not take a long time to run? > > Assuming Linux: what does time > > ls thedir | head > > give? > > with thedir the name of the actual dir about 3 seconds.
3.086u 0.201s 0:03.32 98.7% 0+0k 0+0io 0pf+0w > > Also how many is many files? over 100K (I know I should not do that, but it's a temp dir holding files to be transferred) thanx, mark -- http://mail.python.org/mailman/listinfo/python-list