3 ms·
Is this an issue on ZFS?
by infogulch 5y ago
Is this an issue on ZFS?
- cryptonector 5y agoWay way back in 2005, before ZFS shipped, I actually checked this. Solaris' ls(1) with the `-f` option was able to list a directory with millions of files very quickly. But before I tried the `-f` flag I tried plain `ls`, and that failed miserably because a) ls(1) wants to sort the listing, which means reading the whole directory into memory then sorting it, b) I was using en_US.UTF-8 as my locale, and sorting in UTF-8 locales was way slower than sorting in the C locale. Any time you're dealing with such massive directories, you really must use the `-f` option to ls(1).