Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi everyone,
I'm installing a license server for our server, but it's a bit of a tricky affair. The instructions indicate that I should modify a text file, but I can't, because the file is still in use!
How would you troubleshoot what programs or services are still accessing the files, and how would you stop them?
cheers,
Jorx
** SOLVED **
by using this command which killed processes with this file open
fuser folder/myfile.ext -k
Last edited by jorx; 02-17-2013 at 09:05 PM.
Reason: solved
Programs often open files in such a way that certain operations are prohibited ... specifically including: "I don't care who else wants to read this at the same time I do, but I do not want anyone to be able to write to it while I'm reading it." If a program has done that, as a great many of them do, then you have to shut down the other program(s).
frankbell, Thanks for the links! They don't help in this scenario- the second link is how to figure out what files are open by process X, but I need to know what process is locking this file!
sundialsvcs, that's exactly my problem, because I don't know what process is locking this file.
I need to edit this file, it's locked. Surely there must be a way to hack this?
I once touched Red Hat over a decade ago... I remember linux had different stages/levels of activity, with Xwindows being the highest.
Is there a way I could boot or shut everything down so only the terminal and minimal processes are running? Then I could run cp /path/to/file and use the terminal that way. If I could somehow shutdown all non essential processes?
Well, SORT of solved. Now I can't start the process which is supposed to be using that file. It's a permissions thing. I did use super user to overwrite the fie, and now the service is complaining. Eek! time to figure out how this works...
Solved: I found that my file has improper permissions with
ls -al
and was able to add them back in with chmod.
As always.. if one wants to use Linux, one has to use the terminal alot!
Last edited by jorx; 02-17-2013 at 10:44 PM.
Reason: solved
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.