如何使用bash测试文件系统的目录限制 [英] How to use bash to test directory limits of filesystem

查看:91
本文介绍了如何使用bash测试文件系统的目录限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要测试我可以在文件系统(网络安装和本地(usb)驱动器)上创建多少目录和文件.我现在使用以下bash行:

I need to test how many directories and files I can create on a filesystem (network mounted and local (usb) drives). I now use this bash line:

for i in {0..999999}; do mkdir -p $i; pushd $i; done

我知道它可能可以做得更好,并且我想知道如何做. (以bash表示,不太复杂)

I know that it probably can be done better and I'd like to know how to. (in bash, not too complicated)

推荐答案

while (true); do
  mkdir a
  cd a
done

创建类似./a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/ ...

这篇关于如何使用bash测试文件系统的目录限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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