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?
Answer
If the file is on NFS , you will have to login to the server that is serving the filesystem (the file must be local to the server ), then you can run.
lsof | grep -i filename
It should list any processes that are using the file, you can then close the program (if someone on the network has the file open I think there will be an nfsd process listed against the file). Once all processes are closed you should be able to remove the file as necessary either local or remote. If that doesn't work you should be able to rm -rf from the server to force delete it.
No comments:
Post a Comment