FreeBSD Bugzilla – Attachment 152566 Details for
Bug 197336
find command cannot see more than 32765 subdirectories when using ZFS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
python script to generate a bunch of subdirectories with files in them
dirgen.py (text/plain), 870 bytes, created by
Will Dormann
on 2015-02-04 23:19:51 UTC
(
hide
)
Description:
python script to generate a bunch of subdirectories with files in them
Filename:
MIME Type:
Creator:
Will Dormann
Created:
2015-02-04 23:19:51 UTC
Size:
870 bytes
patch
obsolete
> > >import tempfile >import os >import random > > >def mkdir_p(path): > try: > os.makedirs(path) > except OSError as exc: > if exc.errno == errno.EEXIST and os.path.isdir(path): > pass > else: > raise > > >def construct_dirs2(path): > dirs = 0 > nfiles = 0 > for x in range(300000): > dirs += 1 > deep_path = os.path.join(path, str(x)) > mkdir_p(deep_path) > fd, fname = tempfile.mkstemp(suffix='.txt', prefix='testfind_', >dir=deep_path, text=True) > os.close(fd) > nfiles += 1 > > print "ndirs: {} nfiles: {}".format(dirs, nfiles) > > >def main(): > _basedir = '.' > > workdir = tempfile.mkdtemp(prefix='find_test_', dir=_basedir) > > assert os.path.exists(_basedir) > assert os.path.exists(workdir) > > # construct dirs > construct_dirs2(workdir) > >if __name__ == '__main__': > main() >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 197336
: 152566 |
155161