LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-08-2004, 11:24 AM   #1
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 49
ls with colors


A simple question, maby.

I would like to get colors whenever I do a "ls"-command. I know this can be done with "ls --color=auto" but that's pretty much to write, it's much easier with just "ls". :P So can I change the default in any way so that ls always is called with colors on?

/MezzyMeat
 
Old 11-08-2004, 12:01 PM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Add something like this to your ~/.bashrc:
Code:
alias ls='ls --color -F'
Håkan
 
Old 11-08-2004, 01:32 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Modifiying hakans suggestion a bit:

Code:
alias lsc='ls --color -F'
Why? Because the ANSIfied output isn't suitable
for postprocessing in certain situations.



Cheers,
Tink
 
Old 11-08-2004, 02:45 PM   #4
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Good point!


Håkan
 
  


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
colors? kaens DamnSmallLinux 5 02-10-2005 02:34 AM
vi colors prkn8tr Linux - Software 6 06-03-2004 12:43 AM
colors devit Slackware 1 03-12-2004 07:44 AM
colors? there is no god Linux - Newbie 3 08-18-2003 08:04 PM
Colors jeremy LQ Suggestions & Feedback 4 06-26-2003 04:27 AM


All times are GMT -5. The time now is 12:46 AM.

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