linux目录最深值,linux/windows中最深的目录是什么?

e643ae214b55fab93afd48e0880fab24.png

湖上湖

NTFS:最长路径为 32,767 个 Unicode 字符,每个目录(或文件)的最大长度为 255 字符。看看 NTFS 的百科:http://en.wikipedia.org/wiki/NTFS#InternalsFile names are limited to 255 UTF-16 code points. Certain names are reserved in the volume root directory and cannot be used for files. These are $MFT, $MFTMirr, $LogFile, $Volume, $AttrDef, . (dot), $Bitmap, $Boot, $BadClus, $Secure, $Upcase, and $Extend.[3] (dot) and $Extend are both directories; the others are files. The NT kernel limits full paths to 32,767 UTF-16 code points. There are some additional restrictions on code points and file names.这里面有一句:There are some additional restrictions on code points and file names,我们跟随链接 "Naming Files, Paths, and Namespaces"In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters.Windows API 里面定义了一个常量 MAX_PATH,这个常量的值是 260,不过常量值不一定是具体的长度,继续向下看,文档里面有一个例子For example, the maximum path on drive D is "D:\some 256-character path string"好吧,那就试试E:\>md 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345文件名或扩展名太长。删除一个字符,再试,删除,再试,…… 最后终于可以了,目录长度 244,啊,你是 MSDN 请来的逗比吗?不能着急,继续往下看When using an API to create a directory, the specified path cannot be so long that you cannot append an 8.3 file name (that is, the directory name cannot exceed MAX_PATH minus 12).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值