You can list a directory containing 8 million files But not with ls..
1–10 of 93 posts
Re: You can list a directory containing 8 million files But not with ls..
#2Excellent 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..
#3Sorry our blog is down now - we're trying to get it back up ASAP!
Re: You can list a directory containing 8 million files But not with ls..
#4Just 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.
Re: You can list a directory containing 8 million files But not with ls..
#5Sorry 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...
Re: You can list a directory containing 8 million files But not with ls..
#6Sorry 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..
#7Should be fixed completely and fast now, SPW was a new blog so the cache config was support wrong :-)
Re: You can list a directory containing 8 million files But not with ls..
#8Just 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..
#9Earlier 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 :-)
Re: You can list a directory containing 8 million files But not with ls..
#10The easy way to do this is:
find . -maxdepth 1 -mindepth 1
Those arguments will remove the need for find to stat each directory entry. Regardless, this is a nice walk through of low level details often overlooked.