在 Win7/Mac OS X/Ubuntu 文件系统上,单个文件夹中可以保存的最大文件数是多少?

发布于 2024-12-08 22:24:18 字数 94 浏览 5 评论 0原文

我想知道在提到的所有流行操作系统使用的文件系统中单个文件夹中可以存在的最大文件数是多少。我需要这些信息来确定最低公分母,以便我正在构建的文件夹可以在任何操作系统中打开和访问。

I'm wondering about what is the maximum number of files that can be present in a single folder, in the file systems used by all the prevalent OSes mentioned. I need this information in order to decide the lowest common denominator, so that the folder I'm building can be opened and accessed in any OS.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

遇到 2024-12-15 22:24:18

在 Windows 中(假设为 NTFS):4,294,967,295 个文件

在 Linux 中(假设为 ext4):还有 40 亿个文件(但使用一些自定义索引节点表可能会更少)

在 Mac OS X 中(假设为 HFS):21 亿

但我已经将大约 65000 个文件放入一个目录中,我不得不说只是加载文件列表可以杀死一台普通的电脑。

In Windows (assuming NTFS): 4,294,967,295 files

In Linux (assuming ext4): also 4 billion files (but it can be less with some custom inode tables)

In Mac OS X (assuming HFS): 2.1 billion

But I have put around 65000 files into a single directory and I have to say just loading the file list can kill an average PC.

顾铮苏瑾 2024-12-15 22:24:18

这取决于文件系统。最低的共同点可能是 FAT32,它只允许目录中包含 65,534 个文件。

这些是我能找到的数字:

  • FAT16(旧格式,可以忽略):512
  • FAT32(仍然经常使用,尤其是在外部媒体上):65,534
  • NTFS:4,294,967,295
  • ext2/ext3(Linux):取决于格式化时的配置,最多 4,294,967,295
  • HFS+ (Mac):“高达 21 亿”

This depends on the filesystem. The lowest common denominator is likely FAT32 which only allows 65,534 files in a directory.

These are the numbers I could find:

  • FAT16 (old format, can be ignored): 512
  • FAT32 (still used a lot, especially on external media): 65,534
  • NTFS: 4,294,967,295
  • ext2/ext3 (Linux): Depends on configuration at format time, up to 4,294,967,295
  • HFS+ (Mac): "up to 2.1 billion"
娇俏 2024-12-15 22:24:18

大多数现代操作系统没有上限,或者上限非常高。然而,当文件数量达到 10,000 个时,性能通常会开始下降;在此之前最好将您的目录分成多个子目录。

Most modern OSes have no upper limit, or a very high upper limit. However, performance usually begins to degrade when you have something on the order of 10,000 files; it's a good idea to break your directory into multiple subdirectories before this point.

冷夜 2024-12-15 22:24:18

据我所知,对于 Windows 7,每个目录可以拥有无​​限数量的文件。但是,卷上的文件越多,该卷的性能就越差。

From what I know for Windows 7, you can have unlimited amount of files per directory. BUT the more files you have on a volume, the worse the performance will be for that volume.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文