I got this weird error when I try to delete some file. And the filename doesn't contain any specific characters. Does anyone know why ? It is centos

[root@sandbox ~]# rm -rf /var/log/zookeeper
rm: cannot remove `/var/log/zookeeper': Invalid argument

Something similar happened to me when I was trying to remove an empty folder from a remote server. This is what ls -al was giving as output:

??????????   ? ?       ?       ? ? latest

This was a folder inside another folder and I wanted to delete this. I tried rmdir and this is what I got:

rm: cannot remove: latest: Invalid argument

Nothing seemed to work directly on that folder(not rm -f, not touch, nothing). However, I tried renaming the parent folder and the latest folder was normal again, which I was then able to delete using rm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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