Comments on How to use the fuser command in Linux

Suppose you are given a task to identify the processes that are using a particular file, and then kill them one by one - all this has to be done from the command line. What would you do? Well, if you are a command line newbie, I am sure you'd be clueless, asking around for help. But command line pros will likely have an idea that there exists a command line utility in Linux that lets you identify processes based on the files (or directories, or sockets) they are accessing. Not only that, the tool also allows you to kill these processes, so you don't have to use the kill or killall commands separately. The command line utility we're talking about is fuser.

2 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Marcel

Great article!

I've never heard of fuser at all. I think I'll write a blog post aswell and link to your post for the english version!

Greetings ~Marcel

By: Zelja

Well, not *that* great article. It's a good start, but missing some information, what about detecting processes by port numbers? What does "e" and "m" ACCESS mean? I never saw that in lsof output.