?
Solved

File is Locked

Posted on 2003-10-27
3
Medium Priority
?
258 Views
Last Modified: 2010-04-22
I am new to Linux - so I have a question.  I updated my aliases file and wanted to re-initialize it but I am getting this message.  Any way to check to see what is wrong?

Alias file /etc/aliases is locked (maybe being rebuilt)

Is someone else in it?  How do I check that?

Thanks for your help
0
Comment
Question by:suzbara
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Accepted Solution

by:
paullamhkg earned 600 total points
ID: 9632041
try ps -aux to see any other process using the file /etc/aliases, or any dead process, if find, kill -9 PID to kill the process and try again.

eg.
USER       PID %CPU %MEM   VSZ   RSS TTY      STAT START   TIME COMMAND
root     19866  0.0     0.5       2640  696  pts/0       R    15:28       0:00 ps -aux

so the PID of the ps -aux is 19866, and if I want to delete these process just 'kill -9 19866' the process of ps -aux will kill and close.

remember you must be the root to do the kill process

so if you kill the process which holding your /etc/aliases, you should able to use it again. remembr to make a backup copy of your /etc/aliases before you kill any process related to /etc/aliases.

Hope this can help
0
 
LVL 6

Assisted Solution

by:mbarbos
mbarbos earned 100 total points
ID: 9632625
You might try using lsof (lsof /etc/aliases would be the command) to find out who is locking the file. And than kill the offender as paullamhkg said.
Try first just a kill, kill -9 might be a bit too drastical to start with.

0
 
LVL 2

Author Comment

by:suzbara
ID: 9637662
Thanks guys.  The file was actually released after a bit... but I will keep this for next time!!!

:)  S
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question