限制对在bash文件名长度 [英] Limit on file name length in bash

查看:141
本文介绍了限制对在bash文件名长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

The following questions are meant for bash and linux only:


  1. 是否有字符的文件的绝对路径名的数量限制?

  2. 是否有字符的文件名(不含扩展名)的数量限制只?

如果是的话,这些限制是什么?我如何访问它们的情况下,它们是系统的具体?

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文件名长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆