简体   繁体   中英

How do i track the process of transferringt data from any external usb to PC (linux) ?

I want to write a python script which will keep track while transferring data from external USB to hard disk , I want to track the location of the data being transferred and the time at which the Process ends .(Through CLI) .

I have searched many places on internet but found nothing relevant. Any idea how can I start?

There is actually a piece in the kernel that can monitor accesses to the filesystem and " notify " other processes whenever it happens

It is exported to c libraries, it is exported to python (and even bash!).

You can then find the other files that process access using:

lsof -p <PID>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM