bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] ls - fails in a directory with >6M files


From: Kamil Dudka
Subject: [PATCH] ls - fails in a directory with >6M files
Date: Wed, 30 Jul 2008 12:59:43 +0200

Hello,

as solution to rhbz #441807 (/bin/ls fails in a directory with >6M files)
I propose tiny patch for ls - work with constant amount of memory when not 
sorting and using one_per_line format, no matter how many files are in the 
directory.

Tested with directory of about 10000 files.

Git version:
$ ulimit -v 102400
$ ls -U1 | wc -l
ls: memory exhausted
0

Patched version:
$ ulimit -v 102400
$ ls -U1 | wc -l
102402


Greetings
Kamil Dudka

Attachment: coreutils-ls-write_out.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]