Skip to main content
added 446 characters in body
Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k

With zsh:

autoload age # best in ~/.zshrc if you use that often
ls -ldS -- *(De:age 2018-06-01 2018-06-30:OL[1,20])
  • -S: sort by size. With GNU ls (as found on RedHat 5.3), you can use -U for not sorting as zsh has sorted the list already with OL.
  • (...): glob qualifier
  • D: don't ignore dot files.
  • e:code: evaluate the code to decide whether to select the file
  • age date1 date2: returns true for files with mtime in that range (without time part, it defaults to 00:00:00)
  • OL: reverse sort by length (size)
  • [1,20]: only select the first 20 ones.

With zsh:

autoload age # best in ~/.zshrc if you use that often
ls -ldS -- *(De:age 2018-06-01 2018-06-30:OL[1,20])

With zsh:

autoload age # best in ~/.zshrc if you use that often
ls -ldS -- *(De:age 2018-06-01 2018-06-30:OL[1,20])
  • -S: sort by size. With GNU ls (as found on RedHat 5.3), you can use -U for not sorting as zsh has sorted the list already with OL.
  • (...): glob qualifier
  • D: don't ignore dot files.
  • e:code: evaluate the code to decide whether to select the file
  • age date1 date2: returns true for files with mtime in that range (without time part, it defaults to 00:00:00)
  • OL: reverse sort by length (size)
  • [1,20]: only select the first 20 ones.
Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k

With zsh:

autoload age # best in ~/.zshrc if you use that often
ls -ldS -- *(De:age 2018-06-01 2018-06-30:OL[1,20])