Getting file extensions [linux fs]

Paulo da Silva p_s_d_a_s_i_l_v_a_ns at netcabo.pt
Wed Mar 27 17:49:08 EDT 2019


Hi!

I don't know if this is the right group to ask ... sorry if it isn't.

Is there a way to get the file extensions of a file in linux, the same
way as "filefrag -e <filename>" does?

The purpose is to see if two files are the same file, namely those
copied with the --reflink option in btrfs.

A solution for C is also welcome - I can write a small python extension
to handle that.

BTW, executing filefrag from python is not a solution, because I have
lots of files and that would be too slow.

Thanks for any help. Anyway, as last resource, I can always look at
filefrag source. I am just trying to avoid that.




More information about the Python-list mailing list