Results 1 to 6 of 6
I am using ext2 file system on linux-2.6.26. i want to know whether the file system keeps a record of the absolute pathname for each and every file that have ...
- 02-20-2009 #1Just Joined!
- Join Date
- Feb 2009
- Posts
- 13
finding absolute pathname
I am using ext2 file system on linux-2.6.26. i want to know whether the file system keeps a record of the absolute pathname for each and every file that have been created. if so, where could i find it.
- 02-20-2009 #2Linux User
- Join Date
- Jan 2006
- Posts
- 414
No, a record like that isn't needed as long as each directory knows it's contents.
Why do you need to know the absolute path?
- 02-20-2009 #3Just Joined!
- Join Date
- Feb 2009
- Posts
- 13
i need to know that because if i need to keep track of each and every file created. with help of the absolute address, i can easily perform path walk the file.
or else, can anyone tell me how to keep track of each and every file that has been created.
- 02-20-2009 #4Just Joined!
- Join Date
- Feb 2009
- Posts
- 2
filesystem
hi,i am currently working in ext2 file systems.i need to know how to get the absolute pathname of a file.can anyone help?
- 02-22-2009 #5Just Joined!
- Join Date
- Feb 2009
- Posts
- 45
You could intercept the «open»-libc-call via preloading. Keywords: ld, LD_PRELOAD. This effect can be globalised by:
Originally Posted by veda87
However this approach has a fatal flaw: it does not track file creations that bypass the use of libc-«open» but directly use the «open»-syscall. The only solution to that problem that currently comes to my mind would be to directly manipulate the responsible kernel code.Code:$> man 8 ld.so … /etc/ld.so.preload File containing a compiled list of directories in which to search for libraries and an ordered list of candidate libraries. …
- 02-24-2009 #6Just Joined!
- Join Date
- Feb 2009
- Posts
- 13
i got the absolute pathaname.... i got it through the function
char *dentry_path(struct dentry *dentry, char *buf, int buflen) which is defined in fs/dcache.c
it gives the pathname of the file from the root of the filesystem.....


Reply With Quote