-4

In my Redhat Linux 6 I have a very strange file that doesn't leave the system no matter how I delete it

"web.process" CANNOT BE DELETED.

It's in /opt/folder/web/tmp/default/web.process

This "web.process" CANNOT be deleted. The command I have tried are:

  • command "rm -rf /default" prompts > "directory is not empty"

  • command "rm -f /web.process" prompts > "no such file or directory"

  • command "ll" inside the folder prompts > "??????????? ? ? ? ? ? web.process"

How can I delete this file?

COMMAND: "ls -a /opt/folder/web/tmp/default/web.process"

OUTPUT: ls: cannot access /opt/folder/web/tmp/default/web.process: No such file or directory

COMMAND: "ls -la /opt/folder/web/tmp/default/"

OUTPUT

ls: cannot access /opt/folder/web/tmp/default/web.process: No such file or directory
total 0
drwxrwxr-x. 2 root root 34 Jul 24 14:35 .
drwxrwxr-x. 3 root root 20 Jul 24 11:07 ..
??????????? ? ?    ?     ?            ? web.process

it seems to me that the file has lost it's attributes and it's impossible to delete it off my sda3.

7
  • Can we get the output of df -k /opt/tmp/default pasted into the question?
    – MadHatter
    Jul 24, 2013 at 5:57
  • Oh, and by the way, you should know that rm -rf /default, rm -rf default, and rm -rf /opt/tmp/default are generally three completely different commands. The first and last, in particular, almost certainly don't do the same thing.
    – MadHatter
    Jul 24, 2013 at 5:58
  • OK, there seems to be great confusion about where this file is. At the moment, it seems to be in /default; nowhere is there any suggestion that it's in /opt/tmp except what you write in your first line. Can we get the output of ls -la /, and this time, please edit it into your question.
    – MadHatter
    Jul 24, 2013 at 6:04
  • 1
    For the last time of asking, into your question, please. And the tip doesn't just apply to rm -rf; default, /default, and /opt/tmp/default are usually three different files/directories. You definitely need to understand what putting a / in front of a file name does in UNIX before going too much further!
    – MadHatter
    Jul 24, 2013 at 6:08
  • Clarify the confusion. Is this file in /opt/folder/web/tmp/default/, in which case nothing else you type in your question is relevant, or is it in /default, in which case your question seems confused. Could we get the output of ls -la /opt/folder/web/tmp/default/web.process pasted into the question, to try to clear this up a bit?
    – MadHatter
    Jul 24, 2013 at 6:19

1 Answer 1

3

It appears that the directory /opt/folder/web/tmp/default/ is corrupt. You should unmount the partition this folder exists on and run fsck on it. If you can't unmount that partition at runtime (eg. because it is the root or something), take the whole system offline and do it from a livecd. Then, proceed with data recovery if necessary.

1
  • The other time I have the same problem, but I used the commmand "touch" creating a text file with the exact name, wrote some text in it and it can be deleted. wonder why now i can't do it on this file... anyway thanks for your help and everyone here! :)
    – Amos
    Jul 24, 2013 at 7:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.