[arch-general] Colorized Output Listing
It's very frustrating in Arch that my directories[blue], text files[white], tarballs[red], symbolic links[blue], and scripts[green] are all the same color. How can I colorize this in bash so my Arch Linux system is much easier to sort through? I checked the Wiki and only found something about colorizing my PS1 which is not what I really care about. Thanks for any help...
Have you tried adding this to your .bashrc? alias ls='ls --color=auto' basically just tells bash to execute "ls --color=auto" instead of just ls. Hope that helps you ;) mfg vIiRuS On 08/20/2010 02:43 AM, Carlos Mennens wrote:
It's very frustrating in Arch that my directories[blue], text files[white], tarballs[red], symbolic links[blue], and scripts[green] are all the same color. How can I colorize this in bash so my Arch Linux system is much easier to sort through?
I checked the Wiki and only found something about colorizing my PS1 which is not what I really care about.
Thanks for any help...
and if you want even more color (colorized output for common cli apps), install cope! On Thu, Aug 19, 2010 at 7:48 PM, Phillip Thelen <viirus92@yahoo.de> wrote:
Have you tried adding this to your .bashrc?
alias ls='ls --color=auto'
basically just tells bash to execute "ls --color=auto" instead of just ls.
Hope that helps you ;)
mfg vIiRuS
On 08/20/2010 02:43 AM, Carlos Mennens wrote:
It's very frustrating in Arch that my directories[blue], text files[white], tarballs[red], symbolic links[blue], and scripts[green] are all the same color. How can I colorize this in bash so my Arch Linux system is much easier to sort through?
I checked the Wiki and only found something about colorizing my PS1 which is not what I really care about.
Thanks for any help...
On Thu, Aug 19, 2010 at 8:48 PM, Phillip Thelen <viirus92@yahoo.de> wrote:
Have you tried adding this to your .bashrc?
alias ls='ls --color=auto'
basically just tells bash to execute "ls --color=auto" instead of just ls.
Hope that helps you ;)
Right now I only have a 'root' user and no normal shell users ...yet. I checked /root and there is not /root/.bash*. Am I missing something here? I even created a new user and in their home directory there is no .bashrc. What is wrong with my system or am I expected to manually create the .bashrc file using 'vim'?
for root, you need to create it yourself. it will be created for users you add to the system however. if you do create one for root, you'll have to create a .bash_profile file as well that sources it for it to actually work automagically on login. On Thu, Aug 19, 2010 at 7:50 PM, Carlos Mennens <carloswill@gmail.com>wrote:
On Thu, Aug 19, 2010 at 8:48 PM, Phillip Thelen <viirus92@yahoo.de> wrote:
Have you tried adding this to your .bashrc?
alias ls='ls --color=auto'
basically just tells bash to execute "ls --color=auto" instead of just ls.
Hope that helps you ;)
Right now I only have a 'root' user and no normal shell users ...yet. I checked /root and there is not /root/.bash*. Am I missing something here? I even created a new user and in their home directory there is no .bashrc. What is wrong with my system or am I expected to manually create the .bashrc file using 'vim'?
check /etc/skel/.bashrc. You should be able to use that one as a base file. simply copy it to the /root direcory or the $Home Directory of a user. On 08/20/2010 02:50 AM, Carlos Mennens wrote:
On Thu, Aug 19, 2010 at 8:48 PM, Phillip Thelen <viirus92@yahoo.de> wrote:
Have you tried adding this to your .bashrc?
alias ls='ls --color=auto'
basically just tells bash to execute "ls --color=auto" instead of just ls.
Hope that helps you ;) Right now I only have a 'root' user and no normal shell users ...yet. I checked /root and there is not /root/.bash*. Am I missing something here? I even created a new user and in their home directory there is no .bashrc. What is wrong with my system or am I expected to manually create the .bashrc file using 'vim'?
true, but then he doesn't learn anything :P On Thu, Aug 19, 2010 at 7:57 PM, Phillip Thelen <viirus92@yahoo.de> wrote:
check /etc/skel/.bashrc. You should be able to use that one as a base file. simply copy it to the /root direcory or the $Home Directory of a user.
On 08/20/2010 02:50 AM, Carlos Mennens wrote:
On Thu, Aug 19, 2010 at 8:48 PM, Phillip Thelen <viirus92@yahoo.de> wrote:
Have you tried adding this to your .bashrc?
alias ls='ls --color=auto'
basically just tells bash to execute "ls --color=auto" instead of just ls.
Hope that helps you ;) Right now I only have a 'root' user and no normal shell users ...yet. I checked /root and there is not /root/.bash*. Am I missing something here? I even created a new user and in their home directory there is no .bashrc. What is wrong with my system or am I expected to manually create the .bashrc file using 'vim'?
Am Fri, 20 Aug 2010 02:48:34 +0200 schrieb Phillip Thelen <viirus92@yahoo.de>:
Have you tried adding this to your .bashrc?
alias ls='ls --color=auto'
basically just tells bash to execute "ls --color=auto" instead of just ls.
Drop the "=auto" and you'll get colorized listings with less, too. ls --color=auto | less => usual b/w output ls --color | less => colorized output Heiko
if you want to customize the colors of ls output, edit the LS_COLORS env variable. details here : http://www.linux-sxs.org/housekeeping/lscolors.html you can place that in your .bashrc, and you can set very usefull reg exp, like "*.log", ...
ls --color | less => colorized output
Cheers, Emmanuel
On Thu, Aug 19, 2010 at 08:43:29PM -0400, Carlos Mennens wrote:
It's very frustrating in Arch that my directories[blue], text files[white], tarballs[red], symbolic links[blue], and scripts[green] are all the same color. How can I colorize this in bash so my Arch Linux system is much easier to sort through?
I checked the Wiki and only found something about colorizing my PS1 which is not what I really care about.
Thanks for any help...
Make yourself a dircolors file. Maybe this'll get you started: http://github.com/falconindy/dotfiles/blob/master/.dircolors d
On Thu, Aug 19, 2010 at 7:43 PM, Carlos Mennens <carloswill@gmail.com> wrote:
It's very frustrating in Arch that my directories[blue], text files[white], tarballs[red], symbolic links[blue], and scripts[green] are all the same color. How can I colorize this in bash so my Arch Linux system is much easier to sort through?
I checked the Wiki and only found something about colorizing my PS1 which is not what I really care about.
Thanks for any help...
grab the DIRCOLORS bits from gentoo, they are the best. stick it in /etc/bash.bashrc.local. or use this guys premade package in AUR (looks old, but prob works fine) http://aur.archlinux.org/packages.php?ID=18418 C Anthony
2010-08-19 20:43 -0400, Carlos Mennens wrote: | It's very frustrating in Arch that my directories[blue], text | files[white], tarballs[red], symbolic links[blue], and | scripts[green] are all the same color. How can I colorize this in | bash so my Arch Linux system is much easier to sort through? from my ~/.zshrc: eval $(dircolors -b) # colored filename/directory completion # Attribute codes: # 00 none 01 bold 04 underscore 05 blink 07 reverse 08 concealed # Text color codes: # 30 black 31 red 32 green 33 yellow 34 blue 35 magenta 36 cyan 37 white # Background color codes: # 40 black 41 red 42 green 43 yellow 44 blue 45 magenta 46 cyan 47 white export LS_COLORS='no=0:fi=0:di=1;34:ln=1;36:pi=40;33:so=1;35:do=1;35:bd=40;33;1:cd=40;33;1:or=40;31;1:ex=1;32:*.tar=1;31:*.tgz=1;31:*.arj=1;31:*.taz=1;31:*.lzh=1;31:*.zip=1;31:*.rar=1;31:*.z=1;31:*.Z=1;31:*.gz=1;31:*.bz2=1;31:*.tbz2=1;31:*.deb=1;31:*.pdf=1;31:*.jpg=1;35:*.jpeg=1;35:*.gif=1;35:*.bmp=1;35:*.pbm=1;35:*.pgm=1;35:*.ppm=1;35:*.pnm=1;35:*.tga=1;35:*.xbm=1;35:*.xpm=1;35:*.tif=1;35:*.tiff=1;35:*.png=1;35:*.mpg=1;35:*.mpeg=1;35:*.mov=1;35:*.avi=1;35:*.wmv=1;35:*.ogg=1;35:*.mp3=1;35:*.mpc=1;35:*.wav=1;35:*.au=1;35:*.swp=1;30:*.pl=36:*.c=36:*.cc=36:*.h=36:*.core=1;33;41:*.gpg=1;33:' #export ZLS_COLORS="$LS_COLORS"
Guys, does ArchLinux source ~/.profile file? If not, why? I better prefer to set i.e. aliases for all my shells, not only BASH… -- Jabber: reflexing@reflexing.ru, ICQ: 8163230, Skype on demand.
On Fri, Aug 20, 2010 at 07:53:17PM +0600, reflexing wrote:
Guys, does ArchLinux source ~/.profile file? If not, why? I better prefer to set i.e. aliases for all my shells, not only BASH…
-- Jabber: reflexing@reflexing.ru, ICQ: 8163230, Skype on demand.
Read the INVOCATION section of bash(1). d
On Fri, Aug 20, 2010 at 10:03:30AM -0400, Dave Reisner wrote:
On Fri, Aug 20, 2010 at 07:53:17PM +0600, reflexing wrote:
Guys, does ArchLinux source ~/.profile file? If not, why? I better prefer to set i.e. aliases for all my shells, not only BASH…
-- Jabber: reflexing@reflexing.ru, ICQ: 8163230, Skype on demand.
Read the INVOCATION section of bash(1).
d
Er, that is to say.. it has nothing to do with your distro. Sourcing files out of your home directory is reliant on the shell. d
On Fri, Aug 20, 2010 at 8:04 PM, Dave Reisner <d@falconindy.com> wrote:
On Fri, Aug 20, 2010 at 10:03:30AM -0400, Dave Reisner wrote:
On Fri, Aug 20, 2010 at 07:53:17PM +0600, reflexing wrote:
Guys, does ArchLinux source ~/.profile file? If not, why? I better prefer to set i.e. aliases for all my shells, not only BASH…
-- Jabber: reflexing@reflexing.ru, ICQ: 8163230, Skype on demand.
Read the INVOCATION section of bash(1).
d
Er, that is to say.. it has nothing to do with your distro. Sourcing files out of your home directory is reliant on the shell.
d
It worked for me in RHEL but didn't worked in ArchLinux, please confirm. -- Jabber: reflexing@reflexing.ru, ICQ: 8163230, Skype on demand.
On Fri, Aug 20, 2010 at 08:07:02PM +0600, reflexing wrote:
On Fri, Aug 20, 2010 at 8:04 PM, Dave Reisner <d@falconindy.com> wrote:
On Fri, Aug 20, 2010 at 10:03:30AM -0400, Dave Reisner wrote:
On Fri, Aug 20, 2010 at 07:53:17PM +0600, reflexing wrote:
Guys, does ArchLinux source ~/.profile file? If not, why? I better prefer to set i.e. aliases for all my shells, not only BASH…
-- Jabber: reflexing@reflexing.ru, ICQ: 8163230, Skype on demand.
Read the INVOCATION section of bash(1).
d
Er, that is to say.. it has nothing to do with your distro. Sourcing files out of your home directory is reliant on the shell.
d
It worked for me in RHEL but didn't worked in ArchLinux, please confirm.
-- Jabber: reflexing@reflexing.ru, ICQ: 8163230, Skype on demand.
Since you didn't read the man page, I'll quote it here for you: When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes com‐ mands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.pro‐ file, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior. Short form: if .bash_profile and/or .bash_login exist, .profile will never be read. Again, this is all distro agnostic. d
On Fri, Aug 20, 2010 at 8:18 PM, Dave Reisner <d@falconindy.com> wrote:
On Fri, Aug 20, 2010 at 08:07:02PM +0600, reflexing wrote:
On Fri, Aug 20, 2010 at 8:04 PM, Dave Reisner <d@falconindy.com> wrote:
On Fri, Aug 20, 2010 at 10:03:30AM -0400, Dave Reisner wrote:
On Fri, Aug 20, 2010 at 07:53:17PM +0600, reflexing wrote:
Guys, does ArchLinux source ~/.profile file? If not, why? I better prefer to set i.e. aliases for all my shells, not only BASH…
-- Jabber: reflexing@reflexing.ru, ICQ: 8163230, Skype on demand.
Read the INVOCATION section of bash(1).
d
Er, that is to say.. it has nothing to do with your distro. Sourcing files out of your home directory is reliant on the shell.
d
It worked for me in RHEL but didn't worked in ArchLinux, please confirm.
-- Jabber: reflexing@reflexing.ru, ICQ: 8163230, Skype on demand.
Since you didn't read the man page, I'll quote it here for you:
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes com‐ mands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.pro‐ file, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.
Short form: if .bash_profile and/or .bash_login exist, .profile will never be read. Again, this is all distro agnostic.
d
OK, understand now, sorry for dumb-questioning. -- Jabber: reflexing@reflexing.ru, ICQ: 8163230, Skype on demand.
participants (9)
-
C Anthony Risinger
-
Carlos Mennens
-
Daniel J Griffiths (Ghost1227)
-
Dave Reisner
-
Emmanuel Gras
-
F. Gr.
-
Heiko Baums
-
Phillip Thelen
-
reflexing