Bash – How to sort results from ls command by modification date (directories first)

bashlinuxlssort

I can fire

ls -lrt 

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?

Best Answer

what about something like this:

ls -ltr --group-directories-first
Related Question