|
From: | Mike Miller |
Subject: | ls -l --time-style, configure recent interval |
Date: | Sun, 22 Dec 2019 17:48:07 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
Hi,I'd like to use the --time-style option of ls to make dates more friendly, such as the Python library humanize does. This kind of library turns dates in the last week to something like "2 days ago..." etc. I use this value which is a close approximation:
--time-style='+%Y-%m-%d %k:%M %a %k:%M'This results in something similar to long-iso when distant and a much simpler version when the file is recent:
2019-06-05 14:36 file1 Wed 13:25 file2I'm happy enough with this format, but the problem is that the decision of what is recent appears to be hard-coded to be six months. I'd like to be able to configure that to be one week instead.
Turns out file2 above was modified in July, haha. Any chance of getting an option to tune the "recent interval" parameter?
Thanks, -Mike
[Prev in Thread] | Current Thread | [Next in Thread] |