I tried to remove a file in Linux using rm -rf file_name
, but got the error:
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 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.