How to find process of .nfs files in directories and kill all

860 Views Asked by At

I am trying to delete a folder named sim_build but I am not able because there are several .nfs* files in the sim_build (and also within the subfolders) that are busy/unclosed. I currently find the .nfs* files within directories manually using fuser --kill /path_to_nfs/.nfs*. after I delete all .nfs* files, I delete the folder using rm -rf sim_build.

As you can see this is way too cumbersome. What is the best way to automate it in a makefile?

any help appreciated!

0

There are 0 best solutions below