What Is It?!

[allan@server]$ rm sample-apps/
rm: cannot remove `sample-apps/': Is a directory
[allan@server]$ rmdir sample-apps/
rmdir: failed to remove `sample-apps/': Not a directory

Edit: it was a symlink to a directory. The error messages could be improved!

12 thoughts on “What Is It?!

    • Correct. If you specify the symlink with a trailing slash, then ‘rm’ doesn’t remove the symlink but instead it tries to remove the directory referenced by the symlink.

      • A normal symbol link to a directory without a slash would still be interesting:

        wzyboy@xenien:~/tmp$ echo hello > c
        bash: c: Is a directory
        wzyboy@xenien:~/tmp$ rmdir c
        rmdir: failed to remove ā€˜cā€™: Not a directory

    • If it were a non-empty directory, rmdir should have a different message:
      % rmdir sample
      rmdir: failed to remove ‘sample’: Directory not empty

      That said, I really don’t know what it is. Maybe it’s a btrfs subvolume, like fkol-k4 said.

  1. Cof corse is a systemd feature, to prevent wipping unwanted files now systemd prevent you to delete files.
    just kidding, is a file with corrupted metadata.