Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    linux
  » Colored Files in the Command Line
      by SDE
 Page 1 of 1 
   

(Login to remove green text ads)
Colored Directories and Files in the Command Line
Have you ever noticed that some distributions of linux display different colors for different file types? For example, most redhat releases will have this setup by default, but when you go to use something else like Debian, you lose it.

The fact is that it's really nothing too fancy, it is just an alias setup in your profile. I use the bash shell, and I'm not too sure if this trick works with other shells.

Step 1: Login as the user you want to set this up on.

Step 2: Open the file named .bash_profile in your favorite editor.

Step 3: Add the line below to the file.
Code:
alias ls='ls --color'
Step 4: Save the file.

You will probably have to logout and log back in before you will see your new colored files.




 
 Page 1 of 1 
   

Rate This Article
1 2 3 4 5 6 7 8 9 10





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle