LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2009, 01:25 AM   #1
johnmtb
LQ Newbie
 
Registered: Sep 2008
Posts: 14

Rep: Reputation: 0
colouring ls -al|more


Dear all,

although i have DIR_COLORS showing COLOR all,

when i run ls -al|more, there are no colors.

please halp.

regards,

john
 
Old 01-04-2009, 02:01 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
more is a very old and limited pager. I don't think it even has the ability to show colors. less will display color codes though, if you run it with the -r or -R options. "ls -al | less -r"
 
Old 01-04-2009, 02:03 AM   #3
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
To get colors in the output of ls, you need to call it with the --color option. Like this:

ls --color

If you want ls to display listings in color all the time, you can add the following line to your .bashrc file (in your home directory)

alias ls="ls --color"

Then, open a new terminal and check if it works.
 
Old 01-04-2009, 02:10 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
To get colors in the output of ls, you need to call it with the --color option. Like this:
there is color with ls -a
not with ls -a|more
 
Old 01-04-2009, 07:17 AM   #5
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
Irrelevant, but someone once said:
Quote:
less is more, but more more than more is, so more is less less, so use more less if you want less more.
 
Old 01-05-2009, 12:38 AM   #6
johnmtb
LQ Newbie
 
Registered: Sep 2008
Posts: 14

Original Poster
Rep: Reputation: 0
All,

thank you for your input, i will try your suggestions.

however, i am surprised that this method, ls -al|more (with Color All in DIR_COLORS) is no longer supported. ever since colour was first introduced into Slackware Linux, i have used this command, without any problems. when did it all change?

regards,

john
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Colouring widgets in glade using C sneha hendre Programming 2 10-06-2008 10:12 AM
Colouring things in Linux/Shell Vampirite Linux - General 3 02-19-2006 08:28 AM
Shell Prompts and root ls colouring iantri Slackware 10 09-11-2003 09:48 PM


All times are GMT -5. The time now is 10:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration