Can't delete “xx” because its pathname is too long. 求助如何解决 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
pcm0037
V2EX    macOS

Can't delete “xx” because its pathname is too long. 求助如何解决

  •  
  •   pcm0037 Oct 21, 2023 1585 views
    This topic created in 928 days ago, the information mentioned may be changed or developed.

    系统:macOS 13.0

    问题描述:

    我在移动硬盘有个目录,层级比较多,删除的时候遇到了 Can't delete “xx” because its pathname is too long. 这个问题无法删除。

    尝试过网上提供的方法,sudo rm -rf 也只能删除非空的文件,现在剩下一个多层级目录,总大小 0KB 的目录怎么也删除不了,会提示 rm: ./xx/yy: Directory not empty

    2 replies    2023-10-22 11:14:29 +08:00
    Kirscheis
        1
    Kirscheis  
       Oct 21, 2023
    try rimraf
    orangie
        2
    orangie  
       Oct 22, 2023
    把其中的文件夹名称改短一些,然后再尝试删除。
    About     Help     Advertise     Blog     API     FAQ     Solana     959 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 34ms UTC 22:04 PVG 06:04 LAX 15:04 JFK 18:04
    Do have faith in what you're doing.