限制对在bash文件名长度

编程入门 行业动态 更新时间:2024-10-22 21:44:55
本文介绍了限制对在bash文件名长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

下面的问题仅仅是用来bash和Linux的:

The following questions are meant for bash and linux only:

  • 是否有字符的文件的绝对路径名的数量限制?
  • 是否有字符的文件名(不含扩展名)的数量限制只?
  • 如果是的话,这些限制是什么?我如何访问它们的情况下,它们是系统的具体?

    If so, what might these limits be? How can I access them in case they are system specific?

    推荐答案

    这取决于文件系​​统非常多。对于EXT FS(目前最常用的Linux上):

    It depends very much on the filesystem. For the ext FS (currently the most used on Linux):

    • 最大文件名长度:255字节
    • 的最大路径长度:无

    该扩展是不是FS的意识到,这255个字节,包括扩展名(你可以有任何扩展库文件名)。

    The extension is not something the FS is aware of, it 255 bytes, extension included (you can have file names without any extensions).

    这里是这些限制的更详尽的列表,每FS。

    Here is a more exhaustive list of these limits, per FS.

    此外,还可以扩展到文件系统,它可以改变你的最大长度为好。例如,eCryptFS它使用较低的文件名称的一部分,以保持元数据和限制了文件名到143个字符的最大长度。请参见 Ubuntu的eCryptFS启动板作品。

    There can also be extensions to your file system that can change your maximum length as well. For example, eCryptFS which uses part of the lower file name to keep metadata and limits the file name to a maximum length of 143 characters. See Ubuntu eCryptFS launchpad entry.

    更多推荐

    限制对在bash文件名长度

    本文发布于:2023-11-01 17:57:20,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1550014.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:文件名   长度   bash

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!