Re: Getting file extensions [linux fs]

2019-04-08 Thread Paulo da Silva
Às 01:35 de 06/04/19, Pablo Lucena escreveu: > Have you looked into eBPF? I'll take a look at that. Thanks Pablo. -- https://mail.python.org/mailman/listinfo/python-list

Re: Getting file extensions [linux fs]

2019-04-05 Thread Pablo Lucena
Have you looked into eBPF? They have mature Python bindings. It makes interacting with the kernel as efficient as possible - you can run it in production at high resolutions without putting things at risk. One of the benefits - any averaging / aggregation / histograms / etc can be done by the

Re: Getting file extensions [linux fs]

2019-03-30 Thread Paulo da Silva
Às 22:18 de 28/03/19, Cameron Simpson escreveu: > On 28Mar2019 01:12, Paulo da Silva wrote: >> Às 23:09 de 27/03/19, Cameron Simpson escreveu: ... > > Oh, just tangential to this. > > If you were doing this ad hoc, yes calling the filefrag executable is > very expensive. But if you are always

Re: Getting file extensions [linux fs]

2019-03-28 Thread Cameron Simpson
On 28Mar2019 01:12, Paulo da Silva wrote: Às 23:09 de 27/03/19, Cameron Simpson escreveu: On 27Mar2019 21:49, Paulo da Silva wrote: ... The filefrag manual entry says it works by calling one of 2 ioctls. You can do that from Python with the ioctl() function in the standard fcntl module. I

Re: Getting file extensions [linux fs]

2019-03-27 Thread Paulo da Silva
Às 23:09 de 27/03/19, Cameron Simpson escreveu: > On 27Mar2019 21:49, Paulo da Silva wrote: ... > The filefrag manual entry says it works by calling one of 2 ioctls. You > can do that from Python with the ioctl() function in the standard fcntl > module. I haven't tried to do this, but the results

Re: Getting file extensions [linux fs]

2019-03-27 Thread Cameron Simpson
On 27Mar2019 21:49, Paulo da Silva wrote: 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 " does? The purpose is to see if two files are the same file, namely those copied with the

Getting file extensions [linux fs]

2019-03-27 Thread Paulo da Silva
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 " does? The purpose is to see if two files are the same file, namely those copied with the --reflink option in btrfs. A solution