In article <cistron.200002241602.KAA07287@tomcat.admin.navo.hpc.mil>,
Jesse Pollard <pollard@tomcat.admin.navo.hpc.mil> wrote:
>The program /bin/pwd gives the expected answer by reading the current directory
>to find .., then reading it to locate the inode reference to the current
>unnamed directory (well, known as . -> alias is looked up in .. by searching
>for the inode number). This cycle repeats until /bin/pwd reaches the root
>directory.
Under Solaris and Linux 2.0.x and earlier, yes. But Linux 2.2.x and
up has a getcwd() *system call*. That is pretty unique for a Unix
like system. Linux saves the path to an inode internally - using
something called 'dentries'.
Mike.
-- "quote me on this one - overgaan op Exchange is een wijs besluit" -- MarcoH. -- The From: and Reply-To: addresses are internal news2mail gateway addresses. Reply to the list or to miquels@cistron.nl (Miquel van Smoorenburg)- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:10 EST