Patent ID: 7996366

Claim:
A method for identifying stale directories in a file system, the file system comprising one or more levels of directories, the method comprising: providing a system, wherein the system includes distinct modules, and wherein the distinct modules include: an attribute recording module, a computing module, a stale-directory identifier module, and a reporting module; establishing a file system, the file system having a plurality of branches extending from a root, wherein a branch includes the root and a terminal directory, and at least one branch has a plurality of levels of higher-level directories above the terminal directory along the corresponding branch towards the root; recursively reading an access time from each file in the file system, the access time being a creation time for a non-accessed file, and recording the access time of each recursively read file into an intermediate file, wherein said recording an access time is performed by the attribute recording module; determining a last access time of each level of directories in the file system according to the recorded access times of the recursively read files contained in a respective level of directories, wherein said determining a last access time is performed by the computing module and comprises: comparing the last access time of the directory with the last access time of a file in the directory; updating the last access time of the directory, if the file in the directory has a last access time that is more recent than the last access time of the directory; and repeating the comparing and updating for all the files in the directory; determining as stale the directories that have not been accessed for a period of time that is greater than a pre-defined period of time and determining the highest level stale directory within each branch of the file system by comparing each stale directory with its higher-level directories along the branch, wherein said determining directories is performed by the stale-directory identifier module; and reporting one or more highest-level stale directories that have not been accessed for a period of time, wherein said reporting is performed by the reporting module.