2
There is a file under my home area that I cannot delete. When I do an ls -al
on the directory, the permissions are ?---------
and there is a ? for user, group, size and date columns. When I attempt to remove it, I get the following error from rm: rm: cannot remove 'file': Invalid argument
Any ideas on a method to remove such an odd file?
Is it open in another process? – None – 2013-01-23T20:58:26.260
Could you show the output of
ls -l
on the file? What is your filesystem? – terdon – 2013-01-23T20:59:53.777@JeffreyLin No process is using it – steveo225 – 2013-01-23T21:10:39.563
@terdon I mentioned the output of
ls -l
in the question, I had to usea
as well because it is hidden. The filesystem isnfs
(surprisingly). If I have access to the server it is mounted from I am going to try and delete it there instead. – steveo225 – 2013-01-23T21:12:25.740I wanted the entire output of
ls
to see if there were any weird characters or encoding issues with the file name (which is not in your question). I have sometimes seen strange things like this when using filenames in greek on a file system that was not UTF8 encoded. In any case, if it is an nfs share it may well be a corruption in the sharing process. Either go to the server or remount it, that might help. – terdon – 2013-01-23T21:16:17.143@terdon No weird characters, only
a-f0-9.
. It has been remounted since I first noticed the file. – steveo225 – 2013-01-23T21:19:06.720When you look at the file locally (on the NFS server), does it show the same ownerships/permissions? If it does it's quite likely a case of file-system corruption on the underlying FS rather than an NFS thing. – tink – 2013-01-24T01:09:10.697
@terdon: Funny characters in the file name aren’t likely to be the issue –– if steveo were not typing the file name correctly,
rm
would say “No such file or directory” rather than “Invalid argument” (which is what steveo reported seeing). – Scott – 2013-01-25T01:05:48.213I’m surprised that no one has commented on the fact that the
ls –l
output says?---------
rather than----------
(orbrw-------
orprw-r--r--
or anything else normal). I believe that this is screaming, “This file is not of any known file type”; i.e., the filesystem is corrupt. This probably requires filesystem repair tools. steveo: have you rebooted? Have you runfsck
? – Scott – 2013-01-25T01:06:40.803Yes, server has been rebooted. However, I do not know about the server hosting the file system. I haven't gotten access to it just yet. – steveo225 – 2013-01-25T01:43:31.387