I can fire
to get files and folders sorted by modification date, but this does not separate directories from files. I want
ls to show me first directories by modification date and then files by modification date. How to do that?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
or (for reverse, most recent at bottom):
ls man page describes this in more details, and lists other options.
d in front of there permissions in
So to get directories with sorted modification date use
ls -ltr |grep ^d
And to files other than directories
ls -ltr | grep -v ^d