Live data from Hacker News

You can list a directory containing 8 million files But not with ls..

olark.com

91–93 of 93 posts

Re: You can list a directory containing 8 million files But not with ls..

#92
post #57

Earlier quoted context omitted.

> To test this, he should try "ls | cat". Running /bin/ls will bypass the alias.

Prefixing the command with a \ will also disable the alias (e.g. \ls)

Do you know where this is documented? (I just skimmed the bash docs and couldnt find it) thx.

Re: You can list a directory containing 8 million files But not with ls..

#93
post #82

Earlier quoted context omitted.

Using (5 And I definitely prefer defined constants for two reasons. One, it's likely you'll have to declare multiple such buffers in different places. Two, if I want to tune the parameter, I'd rather do it at the top of a source file with other such defined constants than hunting for the declaration in the code. I do agree that sizeof() is preferable when it's an option.

I don't think he meant it as an optimization. It's easy to understand as 5 * 2^20, and quicker to type.

Correct, to me it's idiomatic. I realize it's not for everyone, so the ultimate best code is probably the way it was written ... On the other hand, sometimes it's fun to push the envelope just a tiny bit, and hope that readers will actually learn something from the code. But that's a thin edge to be balancing on.
Post reply on HN