* 2026-05-15 23:46:38-0400, Karen Lewellen wrote:

> is there an option for the ls command allowing you to set the date
> window you are searching? For example, list only the items added on a
> certain series of days?

Yo need "find" command and its -newerXY or -mtime options.

    find . -maxdepth 1 -newermt 2026-05-01 ! -newermt 2026-05-10 -ls

Meaning: The "m" in "-newermt" means modification time. It finds files
newer than 2026-05-01 but not newer than 2026-05-10. It is also possible
to use relative times in days, with -mtime option:

    find . -maxdepth 1 -mtime -20 -mtime +5 -ls

Meaning: never than 20 days ago but older than 5 days ago.

-- 
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: DD3B8E8ABD28B98176E6A7CCCC9A5E615FCC1D93
/ old key: 6965F03973F0D4CA22B9410F0F2CAE0E07608462

Attachment: signature.asc
Description: PGP signature

Reply via email to