Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Colorized "ls" output, default

Status
Not open for further replies.

thedaver

IS-IT--Management
Jul 12, 2001
2,741
US
In debian I can get colorized "ls" output with the "--color=auto" parameter on the command line. However, this colorized output is the default on Redhat.

I think I prefer colorized output by default.

Into which ".setting" file do I write this value and how?

Thanks, Dave.

D.E.R. Management - IT Project Management Consulting
 
Never mind, Debian shows this in ~/.bashrc.... posted too quickly, though "man ls" didn't say this.....

D.E.R. Management - IT Project Management Consulting
 
man ls" would not tell you that, as .bashrc is a setting file for the Bourne Again SHell, and what you are looking for is an alias... "man bash", maybe, would explain to you the basics of it.

Additionally, if you're in a curious mood, this is a variable that I set in my ~.bashrc - it will change your prompt. I rather enjoy it.

PS1="\n\[\033[35m\]\$(/bin/date)\n\[\033[32m\]\w\n\[\033[1;31m\]\u@\h: \[\033[1;34m\]\$(/usr/bin/tty | /bin/sed -e 's:/dev/::'): \[\033[1;36m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files \[\033[1;33m\]\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\033[0m\] -> \[\033[0m\]"

Hmm. I'm not sure how that's gonna show up but it should be all on one line in the ~.bashrc

-Haben sie fosforos?
-No tiengo caballero, but I have un briquet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top