LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-09-2009, 03:34 PM   #1
twk
Member
 
Registered: Feb 2002
Location: Canada
Distribution: Fedora/RHEL
Posts: 152

Rep: Reputation: 31
Unable to remove directory


I have one problematic directory (snort log directory /var/log/snort) that I am not able to remove. I am unable to run "ls" in the directory - ls hangs. If I run "rm -rfv dir/", rm hangs for awhile, eventually it'll finish but the folder remain and size (~260MB) unchanged.

I've tried single-user-mode and fack the whole /var - same behavior.

Any suggestions?

My other idea is backup all other data and remove/rebuild this LVM volume.
 
Old 10-09-2009, 07:21 PM   #2
djeikyb
Member
 
Registered: Nov 2005
Location: California
Distribution: ubuntu 10
Posts: 162

Rep: Reputation: 33
Impulsively, I'd say some process has got hold of that directory. I'd try playing with fuser, maybe something like fuser -vam /var/dir

Less drastic than reformatting may be booting a livecd to delete the file.

Last edited by djeikyb; 10-09-2009 at 07:23 PM.
 
Old 10-13-2009, 04:57 PM   #3
twk
Member
 
Registered: Feb 2002
Location: Canada
Distribution: Fedora/RHEL
Posts: 152

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by djeikyb View Post
Impulsively, I'd say some process has got hold of that directory. I'd try playing with fuser, maybe something like fuser -vam /var/dir

Less drastic than reformatting may be booting a livecd to delete the file.
I tried the following booting from a rescue CD, and "rm" failed as well. "rm" process actually hung right way (went into "D+" state) after I issued the following.

Code:
rm -rfv /var/log/dir
anyways, I reformat the partition to get rid of this directory.
 
Old 10-13-2009, 08:12 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,873

Rep: Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600Reputation: 2600
It may have been set immutable via chattr http://linux.die.net/man/1/chattr
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rm: cannot remove directory `ff': Directory not empty blancs Linux - General 17 08-29-2011 01:47 PM
Unable to remove directory from my Fedora 11 system edgarosy Linux - Newbie 3 06-12-2009 10:23 AM
Remove a Directory browser Linux - Newbie 8 08-11-2005 08:28 AM
help how to remove directory blackman890 Mandriva 6 11-09-2004 06:06 PM
remove directory?? KaktusKnight Linux - General 8 05-31-2003 01:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration