Skip to content

rm: rm -rf hyper nested dirs fails #9779

Description

@oech3
$ mkdir -p $(python3 -c 'print("./" + "a/" * 32768)')
mkdir: File name too long
$ rm -rf a # fails with Directory not empty. gnu is OK

Activity

  1. collinfunk commented on Dec 22, 2025

    @collinfunk

    Duplicate of #2949; a commenter there is correct, this is required by POSIX.

    It is quite important, IMO. If rm doesn't support arbitrarily long paths, you will have no way to clean them up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions