本文主要是介绍记一次linux Text file busy 问题及解决过程,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题:查看内核消息及各种应用程序的公共日志信息
[root@testmem ~]# /var/log/messages
-bash: /var/log/messages: Text file busy
原因:文件被其他进程占用
解决:使用fuser查出占用进程,如果允许,kill掉
[root@testmem ~]# fuser /var/log/messages
-bash: fuser: command not found
fuser没有安装,进行安装:yum install psmisc
[root@testmem ~]# yum install psmisc
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
There are no enabled repos.Run "yum repolist all" to see the repos you have.To enable Red Hat Subscription Management repositories:subscription-manager repos --enable <repo>To enable custom repositories:yum-config-manager --enable <repo>
系统未注册,红帽的企业版Linux系统RHEL是收费的,必须要注册才可正常使用。替换掉原版的yum,安装一个免费的yum源-->CentOS(CentOS已经被红帽收购,且跟RHEL系统没多大区别,最主要还是可以免费使用)
这篇关于记一次linux Text file busy 问题及解决过程的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!