I tried to remove a file in Linux using rm -rf file_name, but got the error:
rm -rf file_name
rm: file_name not removed. Text file busy
How can I find out which process is using this file?
You can use the fuser command, like:
fuser
fuser file_name
You will receive a list of processes using the file.
You can use different flags with it, in order to receive a more detailed output.
You can find more info in the fuser's Wikipedia article, or in the man pages.
man
1.4m articles
1.4m replys
5 comments
57.0k users