Live data from Hacker News

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

olark.com

1–10 of 93 posts

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

#2
Excellent writeup. Computer systems are discoverable. That attitude, along with some of the basic tools (such as strace, ltrace, man pages, debuggers and a compiler) and a willingness to dive into system source code go a long way. If your tracing leads you to a library call and you don't know what's going on inside, find the source code. If it's the kernel, load up lxr (http://lxr.linux.no/).

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

#6
post #5
post #3

Sorry our blog is down now - we're trying to get it back up ASAP!

looks like it's fine now, but worst case you can access the cached version: http://webcache.googleusercontent.com/search?q=cache:KBsyzf3...

Better cached version: http://webcache.googleusercontent.com/search?q=cache:KBsyzf3...

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

#8
post #4

Just curious did you try 'ls -f' to get unsorted output. I think a lot of your time may have been in getting stuff sorted for output.

I actually didn't try ls -f, but I did try find . and os.listdir and both hung with very similar straces

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

#9
post #6
post #5

Earlier quoted context omitted.

looks like it's fine now, but worst case you can access the cached version: http://webcache.googleusercontent.com/search?q=cache:KBsyzf3...

Better cached version: http://webcache.googleusercontent.com/search?q=cache:KBsyzf3...

no need for cache anymore. Word to the wise, make sure supercache is actually caching when copying wordpress installs :-)
Post reply on HN