Nicer ls, directories first and colorized (MacOS)

ls -g --almost-all --group-directories-first --color --no-group --human-readable --classify
It will print a compact ls -la list with the directories at the beginning. --almost-all - do not list implied . and .. --group-directories-first - group directories before files --color - colorize the output --no-group - in a long listing, don't print group names --human-readable - print human readable sizes (e.g., 1K 234M 2G) --classify - append indicator (one of */=>@|) to entries If you want to see the owner: ls -l --almost-all --group-directories-first --color --no-group --human-readable --classify
Sample Output
total 76K
drwxr-xr-x 15  510 Apr 15 18:04 .git/
drwxr-xr-x  3  102 Apr 13 16:56 ftdetect/
drwxr-xr-x  3  102 Apr 13 16:56 ftplugin/
drwxr-xr-x  3  102 Apr 13 16:56 indent/
drwxr-xr-x  3  102 Apr 13 16:56 snippets/
drwxr-xr-x  3  102 Apr 13 16:56 syntax/
-rw-r--r--  1   12 Apr 13 16:56 .gitignore
-rw-r--r--  1 1.1K Apr 13 16:56 LICENSE
-rw-r--r--  1  409 Apr 13 16:56 Makefile
-rw-r--r--  1 1.0K Apr 13 16:56
-rw-r--r--  1  57K Apr 13 16:56 vim-dockerfile-example.png

By: icatalina
2016-04-15 17:12:35

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: