Posted by howa on 01/05/07 14:03
Martin Mandl - m2m tech support 寫道:
> If you have access to system commands you could try the following:
>
> 1) Get the number of files using something like: ls | wc
> 2) Use your random generator
> 3) Now pick your line e.g. for file # 123: ls | head -123 | tail -1
>
> Have fun
>
>
> howa wrote:
> > for example, there are 10K files in the directory,
> >
> > given that i don't know if files name, is it possible to fetch a file
> > randomly?
> >
> > thanks.
thanks....all examples should work for me...but a little bit slow as my
folder contains more than 10K files....thanks anyway
[Back to original message]
|