find how many files are in use in a folder

How can i find how many files are in use in a folder or its sub folders in unix i tried with fuser .. but i coulnt getting ...

Not sure why you'd want to do this, but you could attempt to use 'find' with one of the access time options, but I don't believe that this will be anywhere near foolproof.

find . -atime -1 -ls

should list all files in the directory tree accessed within the last day. GNU find has an -amin option that deals in minutes rather than days.

In Perl, you can descend the tree and 'stat' each file to get its access time.

Jerry

I believe that the utility that you are looking for is called "lsof"

I've been using Unix in various different flavours for a large number of years, but I've never come across 'lsof' before. It's always a good day when you learn something! Thanks avronius!:b: