Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

File is Locked

Posted on 2003-10-27
3
Medium Priority
?
259 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Fine Tune your automatic Updates for Ubuntu / Debian
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
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…

636 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