Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting by time is inconsistent #411

Closed
tuxiqae opened this issue Aug 29, 2018 · 1 comment
Closed

Sorting by time is inconsistent #411

tuxiqae opened this issue Aug 29, 2018 · 1 comment
Assignees

Comments

@tuxiqae
Copy link

tuxiqae commented Aug 29, 2018

Hi, I've found that the time sorting feature isn't consistent.
It seems to sort differently on each execution of the command - for files which were last modified at the same time.

I've noticed it while using the command 'watch'.

The command I ran:
watch -n0.1 'exa -mbghHla --SORT=time |tail'

I tried to.execute the same command but this time I used 'ls' and it worked flawlessly.

(The ls command - watch -n0.1 'ls -ltr | tail')

@tuxiqae tuxiqae changed the title Sorting by time is not consistent Sorting by time is inconsistent Aug 29, 2018
@ogham ogham self-assigned this Sep 24, 2018
@ogham
Copy link
Owner

ogham commented Sep 24, 2018

Hi! Thanks for reporting the bug.

It looks like exa is using the mtime metadata field, which gets rounded down to the nearest second, rather than the mtime_nsec, which has more precision. So when exa sorts the output, it tries to sort your files by a bunch of identical timestamps, and does not sort them any further than that. (Not sure why it’s doing this — I probably just used the wrong function by mistake)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants