in reply to Is device+inode meaningful?

I recently heard that Ubuntu gives volumes UUIDs as names, presumably to make this sort of thing possible. But it's not something I would bet on: what happens when you use removable media, or for example when you take a disk of one machine, dd it, insert a copy into another?

Replies are listed 'Best First'.
Re^2: Is device+inode meaningful?
by ikegami (Patriarch) on Dec 30, 2006 at 08:23 UTC

    I would keep track of mtime and size to make sure the file hasn't changed since it was processed. I can accept a false positive in the case of where the user has two files with identical paths, mtime and size on different media and he switches the media.

    ( I'm not worried about removable media anyway. The problem is not identifying volumes, but rather determining that "./file" and "file" are the same file. )

      Cwd::abs_path could help you...