Re: File Monitoring under Mac OS X
On Fri, 18 Jun 2004, Krishna Monian wrote: One question I have on fs_usage is that, if you access a file from a bash shell (say more <filename>) then it doesn't report the entire path, but only the filename. Would you happen to know the reason behind this and whether it can be changed? I would imagine that fs_usage is probably printing the string that exists in cnp->cn_pathbuf. When used from a Carbon application (and probably Cocoa too) you'll see /.vol/<10 digit number/<CNID>. While from bash and other posix shells, the current directory is stored as a vnode, and so all you get is what the user typed into the command line. So if he typed "more foo", all you'd get is foo. If they typed "/Volumes/drive/foobar" you'd see /Volumes/drive/foobar". Inside the Kernel, you generally don't reference things by full path names, its *a* parent vnode (there can be multiple different parents to a file) and a name, which is converted to a vnode. I will note again, that this is a complete guess, but if you're in kernel land watching file system operations this is the kind of information you'd have to work with. --- Marek Kozubal marek@portents.com _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Marek Kozubal