How to kill all processes accessing a filesystem on Ubuntu

This is not really safe, ok 😀 ? Do it at your own risk

lsof | grep /filesystem_name | awk '{print $2}' | xargs kill -9

That’s it, Enjoy!

Unknown's avatar

About Ahmed Tawfik

Cybersecurity Professional, Systems Engineer, OSS & Linux Geek
This entry was posted in Linux and tagged , , , , , , . Bookmark the permalink.

Leave a comment