Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Filename generation: sorting by inode number



On Sat, Apr 25, 2015 at 2:17 AM, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> With the "o" glob qualifier for filename generation, it is not possible
> to sort by inode number. Such a feature could be very useful to speed up
> file reading on an ext3 file system when the files are not in the cache.
>
> See:
>   https://lists.debian.org/debian-user/2015/04/msg01310.html
>   http://comments.gmane.org/gmane.mail.mutt.devel/4089

Everything is possible with the "o" glob qualifier by virtue of the
"e" specifier;
zmodload -aF zsh/stat -b:stat b:zstat
ls -Udi *(noe:'zstat -L -A REPLY +inode $REPLY:')

You can also stick that in a helper function ins and use *(no+ins).

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author