LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-30-2012, 10:54 PM   #1
Anup D.
LQ Newbie
 
Registered: Jan 2012
Location: Nanded
Distribution: RHEL
Posts: 25

Rep: Reputation: Disabled
Can't delete directory - question marks showing in ls -l


On CentOS 5.8 I want to delete one directory.
When I type ls -l it shows :
?--------- ? ? ? ? ? locales

It doesn't allow me to rename, move, copy, delete, chown, chgrp, chmod it.
Every command shows only "No such file or directory"

I don't know why this "?" symbol it is showing in permissions.
What can I do to delete this directory?

Last edited by Anup D.; 10-30-2012 at 10:55 PM.
 
Old 10-30-2012, 10:58 PM   #2
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
whether you are trying to delete the directory with root priviledge ? are normal user ? I guess you dont have priviledge for listing & delete permission for the directory

Last edited by jsaravana87; 10-30-2012 at 11:00 PM.
 
Old 10-30-2012, 11:07 PM   #3
Anup D.
LQ Newbie
 
Registered: Jan 2012
Location: Nanded
Distribution: RHEL
Posts: 25

Original Poster
Rep: Reputation: Disabled
It is a Virtuozzo container. I am trying to delete it with root user.
 
Old 10-31-2012, 09:06 AM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by Anup D. View Post
On CentOS 5.8 I want to delete one directory.
When I type ls -l it shows :
?--------- ? ? ? ? ? locales

It doesn't allow me to rename, move, copy, delete, chown, chgrp, chmod it.
Every command shows only "No such file or directory"

I don't know why this "?" symbol it is showing in permissions.
What can I do to delete this directory?
Likely your filesystem corrupted.

Try to run fsck

Valery
 
Old 10-31-2012, 03:25 PM   #5
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
If the problem was only the name I'd suggest "ls -lb".
The filename may contain non-printing characters that have messed up the output you are reading.
If that's right then something like "rm -ri ./*locales" may work.

With the permissions also looking odd I agree with the suggestion to fsck.
 
Old 10-31-2012, 10:55 PM   #6
Anup D.
LQ Newbie
 
Registered: Jan 2012
Location: Nanded
Distribution: RHEL
Posts: 25

Original Poster
Rep: Reputation: Disabled
Thank you for reply.

I tried ls -lb command it shows locales directory name in red background:
# ls -lb
?--------- ? ? ? ? ? locales

and command "rm -ri ./*locales" also giving the same error
# rm -ri ./*locales
rm: cannot lstat `./locales': No such file or directory.

It is live container with number of live clients.
fsck does not affect data ?
 
Old 11-01-2012, 09:49 AM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
You cannot run fsck on a mounted file system. You will have to arrange a scheduled maintenance time, take the file system offline, and clean it up. You have a slightly (hopefully!) corrupted file system. There is little other choice for repairing it.
 
  


Reply



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
[SOLVED] ls shows directory attributes as question marks daisychick Linux - Newbie 5 04-30-2012 03:19 PM
Using question marks in mod_rewrite kevin-fdc Linux - Server 4 03-16-2010 04:24 PM
Question marks in the directory attributes, need help fixing. jason143 Linux - Software 5 06-22-2009 01:17 AM
question marks show when doing ll abylin1 Linux - Newbie 9 01-15-2008 02:54 PM
Quotes as Question Marks in Thunderbird. Matir Linux - Software 2 07-11-2005 02:54 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 05:26 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