paged 'ls' in color

ls -lah --color=always | most
Even though --color is an option for 'ls' it will not display in color when doing 'ls -lah --color=always | less' to have color output when doing a directory listing and piping it out to page through results, replace less with most. To install most if not installed, run: sudo apt-get install most

By: Code_Bleu
2010-01-04 22:21:13

What Others Think

Or use: 'less -r' Or: export 'LESS=-r'
flatcap · 628 weeks and 6 days ago
Many distributors of bash alias ls to be "ls --color=auto", in which case colors are only used if the output is a terminal, not when connected to a pipe. Flatcap is right, use -r or -R to turn on colors in less, and use the short form of --color=always: ls -lah --color | less -R
bwoodacre · 628 weeks and 6 days ago
A very interesting topic that I have reviewed, Porn Industry Opposed Censoring I think this is one of the most important pieces of information for me. I'm glad to read your article. Often such commands are missed which didn't happen in your case.
TwanGrey · 23 weeks ago
Wow! I visited here the first time. Thank you very much for this discussion. I have really enjoyed it. Continue to upload towing service
alexhales123 · 6 weeks and 6 days ago

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: