title: Why Linux rm -rf throws Invalid argument error?
body: <p>I logged into rhel 7 box (a docker container) and runs as root. I tried to remove a directory and I keep getting Invalid argument error. Here is my command</p>
  
  <pre><code>[root@sandbox ~]# rm -rf /var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/5.5.2.2.5
  rm: cannot remove `/var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/5.5.2.2.5': Invalid argument
  </code></pre>
  
  <p>Here is the permission of that folder</p>
  
  <pre><code>[root@sandbox ~]# ls -lrth /var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/
  total 4.0K
  drwxr-xr-x 1 root root 4.0K Nov  7 07:50 5.5.2.2.5
  </code></pre>
  
  <p>The folder is actually empty:</p>
  
  <pre><code>[root@sandbox ~]# ls -lrth /var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/5.5.2.2.5/
  total 0
  </code></pre>
  
  <p>Trying to put the path in quote is not working either:</p>
  
  <pre><code>[root@sandbox ~]# rmdir "/var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/5.5.2.2.5"
  rmdir: failed to remove `/var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/5.5.2.2.5': Invalid argument
  </code></pre>
  
  <p>Delete by using inode is not working either:</p>
  
  <pre><code>[root@sandbox ~]# ls -il /var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/
  total 4
  98616 drwxr-xr-x 1 root root 4096 Nov  7 07:50 5.5.2.2.5
  root@sandbox ~]# find . -inum 98616 -exec rm -i {} \; # doesn't throws error but the folder is still there
  [root@sandbox ~]# ls /var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/
  5.5.2.2.5
  </code></pre>
  
  <p>Delete by using find is not working either:</p>
  
  <pre><code>[root@sandbox ~]# find /var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/ -type d -exec rm -Rf {} \;
  rm: cannot remove `/var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/5.5.2.2.5': Invalid argument
  rm: cannot remove `/var/lib/ambari-server/data/tmp/solr-service/custom-services/SOLR/5.5.2.2.5': Invalid argument
  </code></pre>
  
  <p>How to remove that folder?</p>