Opened File Accessor

Gabriel9999

Member
Joined
Mar 12, 2019
Messages
38
Reaction score
4
Credits
130
I want to remove a file in my home directory. But when I try to remove with with rm command I can not because given file is used by other processes. How can a find or list the processes which is opened or using this file? Thanks
 


atanere

Well-Known Member
Joined
Apr 6, 2017
Messages
2,626
Reaction score
2,759
Credits
26
What's the file you want to remove?

The top or htop command is one way to see running programs. Use CTRL-C to close it.

[EDIT] top/htop shows running programs or processes, but it doesn't show what files are in use. A couple of other options that may be more what you are looking for are the fuser and lsof commands. See more details here and here.

Good luck!
 
Last edited:
$100 Digital Ocean Credit
Get a free VM to test out Linux!


Top