Skip to main content
deleted 2 characters in body
Source Link
muru
  • 78.3k
  • 16
  • 214
  • 320

tldr; How to just fix it?

To quickly fix the problem:

$ LS_COLORS+=':ow=01;33' 
  • Makes other-writable files show up as yellow on nobg
  • Edit your shell profile (e.g. ~/.bashrc, ~/.profile, etc) to make this permanent.

More details:

Replace 33 by 34 for blue on nobg. Even simpler, to make it nofg on nobg:

LS_COLORS+=:ow= 

To make your change permanent, append it to your .profile:

echo "export LS_COLORS+=':ow=01;33'" >> ~/.profile 

To view the non-extension related rules of LS_COLORS:

echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' 

sed puts each rule on one line and grep removes the rules beginning by *.'.


To explore the ls colors on your terminal, consider using

C="$LS_COLORS" function sc () { echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' } function t () { ls /mnt # Or the path to your example directory. } 

Then

LS_COLORS="$C:ow=38;5;250;48;5;025";t 

As stated in another answer (that of Thomas Nyman), 38;5; is the prefix for foreground x-term 256-colors, and 48;5; for background x-term 256-colors. 256-colors isn't supported by all terminals though.

Also see -What do the different colors mean in ls?- on AskUbuntu.

tldr; How to just fix it?

To quickly fix the problem:

$ LS_COLORS+=':ow=01;33' 
  • Makes other-writable files show up as yellow on nobg
  • Edit your shell profile (e.g. ~/.bashrc, ~/.profile, etc) to make this permanent.

More details:

Replace 33 by 34 for blue on nobg. Even simpler, to make it nofg on nobg:

LS_COLORS+=:ow= 

To make your change permanent, append it to your .profile:

echo "export LS_COLORS+=':ow=01;33'" >> ~/.profile 

To view the non-extension related rules of LS_COLORS:

echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' 

sed puts each rule on one line and grep removes the rules beginning by *.'.


To explore the ls colors on your terminal, consider using

C="$LS_COLORS" function sc () { echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' } function t () { ls /mnt # Or the path to your example directory. } 

Then

LS_COLORS="$C:ow=38;5;250;48;5;025";t 

As stated in another answer (that of Thomas Nyman), 38;5; is the prefix for foreground x-term 256-colors, and 48;5; for background x-term 256-colors. 256-colors isn't supported by all terminals though.

Also see -What do the different colors mean in ls?- on AskUbuntu.

tldr; How to just fix it?

To quickly fix the problem:

LS_COLORS+=':ow=01;33' 
  • Makes other-writable files show up as yellow on nobg
  • Edit your shell profile (e.g. ~/.bashrc, ~/.profile, etc) to make this permanent.

More details:

Replace 33 by 34 for blue on nobg. Even simpler, to make it nofg on nobg:

LS_COLORS+=:ow= 

To make your change permanent, append it to your .profile:

echo "export LS_COLORS+=':ow=01;33'" >> ~/.profile 

To view the non-extension related rules of LS_COLORS:

echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' 

sed puts each rule on one line and grep removes the rules beginning by *.'.


To explore the ls colors on your terminal, consider using

C="$LS_COLORS" function sc () { echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' } function t () { ls /mnt # Or the path to your example directory. } 

Then

LS_COLORS="$C:ow=38;5;250;48;5;025";t 

As stated in another answer (that of Thomas Nyman), 38;5; is the prefix for foreground x-term 256-colors, and 48;5; for background x-term 256-colors. 256-colors isn't supported by all terminals though.

Also see -What do the different colors mean in ls?- on AskUbuntu.

90% of readers probably just want to know what to do about it without learning a ton of dircolors details.
Source Link
AdminBee
  • 23.6k
  • 25
  • 55
  • 77

tldr; How to just fix it?

tldr; How to just fix it?

To quickly fix the problem:

$ LS_COLORS+=':ow=01;33' 
  • Makes other-writable files show up as yellow on nobg
  • Edit your shell profile (e.g. ~/.bashrc, ~/.profile, etc)(e.g. ~/.bashrc, ~/.profile, etc) to make this permanent.

More details:

Replace 33 by 34 for blueblue on nobgnobg. Even simpler, to make it nofgnofg on nobgnobg:

LS_COLORS+=:ow= 

To make your change permanent, append it to your .profile:

echo "export LS_COLORS+=':ow=01;33'" >> ~/.profile 

To view the non-extension related rules of LS_COLORSLS_COLORS:

echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' 

sed puts each rule on one line and grep removes the rules beginning by *.'.


To explore the ls colors on your terminal, consider using

C="$LS_COLORS" function sc () { echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' } function t () { ls /mnt # Or the path to your example directory. } 

Then

LS_COLORS="$C:ow=38;5;250;48;5;025";t 

As stated in another answer (that of Thomas Nyman), 38;5; is the prefix for foreground x-term 256-colors, and 48;5; for background x-term 256-colors. 256-colors isn't supported by all terminals though.

Also see -What do the different colors mean in ls?- on AskUbuntu.

tldr; How to just fix it?

To quickly fix the problem:

$ LS_COLORS+=':ow=01;33' 
  • Makes other-writable files show up as yellow on nobg
  • Edit your shell profile (e.g. ~/.bashrc, ~/.profile, etc) to make this permanent.

More details:

Replace 33 by 34 for blue on nobg. Even simpler, to make it nofg on nobg:

LS_COLORS+=:ow= 

To make your change permanent, append it to your .profile:

echo "export LS_COLORS+=':ow=01;33'" >> ~/.profile 

To view the non-extension related rules of LS_COLORS:

echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' 

sed puts each rule on one line and grep removes the rules beginning by *.'.


To explore the ls colors on your terminal, consider using

C="$LS_COLORS" function sc () { echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' } function t () { ls /mnt # Or the path to your example directory. } 

Then

LS_COLORS="$C:ow=38;5;250;48;5;025";t 

As stated in another answer (that of Thomas Nyman), 38;5; is the prefix for foreground x-term 256-colors, and 48;5; for background x-term 256-colors. 256-colors isn't supported by all terminals though.

Also see -What do the different colors mean in ls?- on AskUbuntu.

tldr; How to just fix it?

To quickly fix the problem:

$ LS_COLORS+=':ow=01;33' 
  • Makes other-writable files show up as yellow on nobg
  • Edit your shell profile (e.g. ~/.bashrc, ~/.profile, etc) to make this permanent.

More details:

Replace 33 by 34 for blue on nobg. Even simpler, to make it nofg on nobg:

LS_COLORS+=:ow= 

To make your change permanent, append it to your .profile:

echo "export LS_COLORS+=':ow=01;33'" >> ~/.profile 

To view the non-extension related rules of LS_COLORS:

echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' 

sed puts each rule on one line and grep removes the rules beginning by *.'.


To explore the ls colors on your terminal, consider using

C="$LS_COLORS" function sc () { echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' } function t () { ls /mnt # Or the path to your example directory. } 

Then

LS_COLORS="$C:ow=38;5;250;48;5;025";t 

As stated in another answer (that of Thomas Nyman), 38;5; is the prefix for foreground x-term 256-colors, and 48;5; for background x-term 256-colors. 256-colors isn't supported by all terminals though.

Also see -What do the different colors mean in ls?- on AskUbuntu.

90% of readers probably just want to know what to do about it without learning a ton of dircolors details.
Source Link

tldr; How to just fix it?

To quickly fix the problem, (make other-writable files yellow on nobg):

$ LS_COLORS+=':ow=01;33' 
  • Makes other-writable files show up as yellow on nobg
  • Edit your shell profile (e.g. ~/.bashrc, ~/.profile, etc) to make this permanent.

More details:

Replace 33 by 34 for blue on nobg. Even simpler, to make it nofg on nobg:

LS_COLORS+=:ow= 

To make your change permanent, append it to your .profile:

echo "export LS_COLORS+=':ow=01;33'" >> ~/.profile 

To view the non-extension related rules of LS_COLORS:

echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' 

sed puts each rule on one line and grep removes the rules beginning by *.'.


To explore the ls colors on your terminal, consider using

C="$LS_COLORS" function sc () { echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' } function t () { ls /mnt # Or the path to your example directory. } 

Then

LS_COLORS="$C:ow=38;5;250;48;5;025";t 

As stated in another answer (that of Thomas Nyman), 38;5; is the prefix for foreground x-term 256-colors, and 48;5; for background x-term 256-colors. 256-colors isn't supported by all terminals though.

Also see -What do the different colors mean in ls?- on AskUbuntu.

To quickly fix the problem, (make other-writable files yellow on nobg):

LS_COLORS+=':ow=01;33' 

Replace 33 by 34 for blue on nobg. Even simpler, to make it nofg on nobg:

LS_COLORS+=:ow= 

To make your change permanent, append it to your .profile:

echo "export LS_COLORS+=':ow=01;33'" >> ~/.profile 

To view the non-extension related rules of LS_COLORS:

echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' 

sed puts each rule on one line and grep removes the rules beginning by *.'.


To explore the ls colors on your terminal, consider using

C="$LS_COLORS" function sc () { echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' } function t () { ls /mnt # Or the path to your example directory. } 

Then

LS_COLORS="$C:ow=38;5;250;48;5;025";t 

As stated in another answer (that of Thomas Nyman), 38;5; is the prefix for foreground x-term 256-colors, and 48;5; for background x-term 256-colors. 256-colors isn't supported by all terminals though.

Also see -What do the different colors mean in ls?- on AskUbuntu.

tldr; How to just fix it?

To quickly fix the problem:

$ LS_COLORS+=':ow=01;33' 
  • Makes other-writable files show up as yellow on nobg
  • Edit your shell profile (e.g. ~/.bashrc, ~/.profile, etc) to make this permanent.

More details:

Replace 33 by 34 for blue on nobg. Even simpler, to make it nofg on nobg:

LS_COLORS+=:ow= 

To make your change permanent, append it to your .profile:

echo "export LS_COLORS+=':ow=01;33'" >> ~/.profile 

To view the non-extension related rules of LS_COLORS:

echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' 

sed puts each rule on one line and grep removes the rules beginning by *.'.


To explore the ls colors on your terminal, consider using

C="$LS_COLORS" function sc () { echo "$LS_COLORS" | sed 's/:/\n/g' | grep -v '\*.' } function t () { ls /mnt # Or the path to your example directory. } 

Then

LS_COLORS="$C:ow=38;5;250;48;5;025";t 

As stated in another answer (that of Thomas Nyman), 38;5; is the prefix for foreground x-term 256-colors, and 48;5; for background x-term 256-colors. 256-colors isn't supported by all terminals though.

Also see -What do the different colors mean in ls?- on AskUbuntu.

added 374 characters in body
Source Link
loxaxs
  • 2k
  • 1
  • 18
  • 14
Loading
Source Link
loxaxs
  • 2k
  • 1
  • 18
  • 14
Loading