Today I found about the --group-directories-first flag of the GNU ls program. You might be wondering about what does that flag do. It reduces cursing in a 90% when using ls, and overall keeps you sane when using the shell. That's what it does. It makes the sun shine, and the birds sing.

It is truly the very best thing since sliced bread. And since the potato peeler, of course.

And has been available since 2006. **facepalm**

Cool!! Do you know the short way? And by the way, do you know how to sort the list by other criteria (date, size) Cheers!

Comment by Juan C. Caicedo Thu 10 Dec 2009 10:50:11 AM CET

I think there is no short alternative for that flag. but you can fix that easily with aliases. Put this in your ~/.bashrc

alias ls='ls --group-directories-first'

for other sorting options, please RT(Fine)M, particullary the --sort=XXXX option

Comment by jerojasro Thu 10 Dec 2009 03:59:00 PM CET
Add a comment