LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 10-16-2010, 09:38 PM   #1
davidhaore
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
Question directory listing of files that don't exist!


I think as a result of a script that started duplicating files in a loop, the allotted capacity on my VPS filled up with multiple nested copies of the same files...
After a reboot, I could delete most of them, but got rm stalled in certain directories...

after isolating which ones, I found this:
a directory listing that lists the files, and at the same time tells me they are not there!!!

partial listing:
Code:
 ls
ls: cannot access userkey.php: No such file or directory
ls: cannot access workshop.php: No such file or directory
ls: cannot access quiz.php: No such file or directory
ls: cannot access webservice_rest.php: No such file or directory
ls: cannot access qtype_essay.php: No such file or directory
ls: cannot access readme: No such file or directory
ls: cannot access portfolio.php: No such file or directory
If I stat any of those files, I get this:
Code:
stat userkey.php 
stat: cannot stat `userkey.php': No such file or directory
ls -all looks like this:
Code:
drwxr-xr-x 2 apache apache 8192 Oct 16 11:03 .
drwxr-xr-x 5 apache apache 4096 Oct 16 11:03 ..
-????????? ? ?      ?         ?            ? access.php
-????????? ? ?      ?         ?            ? activitynames.php
-????????? ? ?      ?         ?            ? admin.php
-????????? ? ?      ?         ?            ? algebra.php
-????????? ? ?      ?         ?            ? assignment.php
(this is all as root...)

So - - -

I cannot rm them, mv or cp... what else is there to do???

Thanks in advance!
David
 
Old 10-16-2010, 10:42 PM   #2
johnshen64
LQ Newbie
 
Registered: Jun 2010
Posts: 29

Rep: Reputation: 5
your file system is corrupt. umount it and do an fsck. if it is the root file system, you might even need to boot the system into a livecd to fsck the file system.
 
Old 10-16-2010, 10:55 PM   #3
joec@home
Member
 
Registered: Sep 2009
Location: Houston Tx
Posts: 89

Rep: Reputation: 29
Look for virtual files, identify the process that is creating the files, restart that process.

Code:
lsof |grep delete
 
Old 10-16-2010, 11:33 PM   #4
davidhaore
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Original Poster
Rep: Reputation: 0
hmm...
Joec: none of the 'files' show in the lsof listing... so I suppose they are not 'open'
Johnshen: I would LOVE to do fsck, but this is on my virtual server, and they (the hosts) tell me I cannot (I suppose as it's all part of the same filesystem?) Are they giving me a line, or does than make sense...?
thanks
David
 
Old 10-17-2010, 08:43 AM   #5
johnshen64
LQ Newbie
 
Registered: Jun 2010
Posts: 29

Rep: Reputation: 5
If you cannot fsck, can you reboot the virtual server? Can they reboot it for you? fsck is usually done automatically if there is a filesystem issue. Do you have root on the box? In any case, if someone tells you that you cannot do it, you should ask that someone to fix it.
 
Old 10-17-2010, 08:21 PM   #6
joec@home
Member
 
Registered: Sep 2009
Location: Houston Tx
Posts: 89

Rep: Reputation: 29
Yup, of lsof does not list then, get someone to run a fsck
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Directory is invisible in listing but it is exist. BCJapan Linux - Enterprise 5 09-25-2009 01:06 PM
Got to be a better way. Perl recursive directory listing (not files) PB0711 Programming 8 03-16-2009 05:24 PM
csh. listing all files in a directory grinch Programming 3 05-03-2007 02:23 PM
Listing files in a directory without ls and find? szahri Linux - Newbie 11 03-23-2007 03:12 AM
listing files in a directory Linh Programming 7 05-17-2004 04:35 AM


All times are GMT -5. The time now is 01:13 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration