Hi!
I'm working on a tool to cleanup linux parititions (removing backup files,
unneeded zip-files, files not accessed for a certain period etc. To do this,
I have to scan all directories. I have found a way to scan the root
directory (with calls in <dir.h> en <linux/dirent.h>) but they only return
the name of the entry, not the type. To examine type and time, i need to
access the inode. I got a inode-number, but no pointer to the inode. I
searched the .h files, but all calls to request inodes require a superblock
or __KERNEL__ defined. Can someone tell me:
1) How to access inodes in a normal program
or
2) How to find the superblock of the root device
3) Has anyone some interesting tips or ideas about scanning the filesystem ?
Maybe I didn't see the very simple solution, but after days of searching I
think this is a more efficient way...
Greetz,
Jos
--