Linux下执行程序出现Text file busy错误提示时的解决方案
Linux Text file busy(文本文件忙),发生此错误是因为当前文件已被占用,因此只要找出占用该文件的进程并杀死就可以了。
执行步骤
-
找出占用该文件的进程:
注意: 此步需要进到文件所在目录,或将文件路径写全(sudo) fuser filename(文件名)
-
杀死占用该文件的进程
(sudo) kill -9 进程id
示例
cp: system/bin/hostapd: Text file busy
1|root@p201_iptv:/ # fuser hostapd
fuser: can't stat 'hostapd': No such file or directory
1|root@p201_iptv:/ # fuser system/bin/hostapd
6149
root@p201_iptv:/ # kill -9 6149