Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Detecting whether two pathes refer to the same file

by BioLion (Curate)
on Sep 10, 2010 at 09:40 UTC ( #859615=note: print w/ replies, xml ) Need Help??


in reply to Detecting whether two pathes refer to the same file

A quick look on CPAN turns up File::Same and File::is, both of which do file comparisons (Including checking if it is the 'same' file in different locations), so specific mention of symlinks, but they use the INODE approach for comparisons so it should be workable.

File::is is much newer though. I haven't tested/used either, and there may well be others, but this seems to be a problem a lot of other people have thought about, so I am sure a good solution exists out there! Hope this helps!

Just a something something...


Comment on Re: Detecting whether two pathes refer to the same file
Re^2: Detecting whether two pathes refer to the same file
by rovf (Priest) on Sep 10, 2010 at 09:53 UTC
    Thanks a lot, I will have a look at them!


    -- 
    Ronald Fischer <ynnor@mm.st>
Re^2: Detecting whether two pathes refer to the same file
by rovf (Priest) on Sep 10, 2010 at 10:42 UTC
    A quick look on CPAN turns up File::Same and File::is
    File::Same doesn't check, whether two pathes name the same file, but whether two pathes point to (possibly different) files, having the same content.

    File::is tries to verify the identity of the files, but only by inode number, which is (as we have learned from ambrus is not even correct on Unix, and does not work at all on Windows :-(

    -- 
    Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://859615]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2014-09-20 17:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (160 votes), past polls