comp.unix.programmer

[GNU/Linux] obtaining a filesystem-relative filename


	Do I understand it correctly that to obtain a
filesystem-relative filename (such as: jrh/foo for /home/jrh/foo
when /home is on a separate filesystem), I need to resolve all
the symbolic links first, and then to check /etc/mtab for a
prefix matching the filename in question? The filename is then
stripped of the prefix found.
I guess that I should double-check that the device mentioned in
/etc/mtab matches the st_rdev number (as per stat(2))?
--
FSF associate member #7257




Written by Ivan Shmakov 19/10/2011 11.37.46
Check some pics on this site!
23/05/2012 22.26.23