Operating System - Linux
1827262 Members
2331 Online
109717 Solutions
New Discussion

find only files not linked to running process

 
SOLVED
Go to solution
Leo The Cat
Regular Advisor

find only files not linked to running process

Hi

I want to remove some files but only files not linked to running process. Is it possible ?

Thanks for the clue,
Bests Regards
Den.
2 REPLIES 2
Ivan Ferreira
Honored Contributor
Solution

Re: find only files not linked to running process

You can use the fuser command or lsof to identify if a file is currently used.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Leo The Cat
Regular Advisor

Re: find only files not linked to running process

Thanks Ivan. lsof is doing the job.
Have a nice week-end