ls --group-directories-last ? (List directories AFTER files)

We know there is a way to list directories before files using:

ls -1 --group-directories-first 

Is there a way to get the opposite? I thought --reverse would do the trick but apparently not.

NOTE: I don't need a solution that works with multiple column output. Hence I've included -1 (or, analogously, -l).


The beauty of the shell is that you can compose different units of logic using pipes:

ls -1 --group-directories-first | tac

Where tac reverses what it receives from stdin (opposite of cat). It even works with colored output which was crucial for me:

ls -1 --color=always --group-directories-first | tac

Category: linux Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.268 (s). 12 q(s)