Skip to main content
deleted 1 character in body
Source Link
terdon
  • 252.7k
  • 69
  • 481
  • 719

The colors of ls can represent the permissions,permissions; the defaults for some systems is to show directories where everyone has write permissions with a green background:

enter image description here

You can change the colors by editing your $LS_COLORS variable using dircolors (from man ls):

 Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it. 

The syntax is admittedly kind of annoying here but you can change this color by creating a file with the colors you want and saving it as ~/.dircolors:

dircolors -p > ~/.dircolors 

That command will print the defaults into ~/.dircolors. You will then need to edit that file and change this line:

OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky 

For example, to make it black text on a red background (see here for a list of color codes):

OTHER_WRITABLE 30;41 # dir that is other-writable (o+w) and not sticky 

You don't need to have all the defaults, you can also just create a file with a single line, redefining just the one you want to change. Anyway, once you have created the file, load it with:

eval "$(dircolors ~/.dircolors)"; 

And here it is in action:

enter image description here

To have that happen automatically, add the eval command above to your ~/.bashrc file.

The colors of ls can represent the permissions, the defaults for some systems is to show directories where everyone has write permissions with a green background:

enter image description here

You can change the colors by editing your $LS_COLORS variable using dircolors (from man ls):

 Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it. 

The syntax is admittedly kind of annoying here but you can change this color by creating a file with the colors you want and saving it as ~/.dircolors:

dircolors -p > ~/.dircolors 

That command will print the defaults into ~/.dircolors. You will then need to edit that file and change this line:

OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky 

For example, to make it black text on a red background (see here for a list of color codes):

OTHER_WRITABLE 30;41 # dir that is other-writable (o+w) and not sticky 

You don't need to have all the defaults, you can also just create a file with a single line, redefining just the one you want to change. Anyway, once you have created the file, load it with:

eval "$(dircolors ~/.dircolors)"; 

And here it is in action:

enter image description here

To have that happen automatically, add the eval command above to your ~/.bashrc file.

The colors of ls can represent the permissions; the defaults for some systems is to show directories where everyone has write permissions with a green background:

enter image description here

You can change the colors by editing your $LS_COLORS variable using dircolors (from man ls):

 Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it. 

The syntax is admittedly kind of annoying here but you can change this color by creating a file with the colors you want and saving it as ~/.dircolors:

dircolors -p > ~/.dircolors 

That command will print the defaults into ~/.dircolors. You will then need to edit that file and change this line:

OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky 

For example, to make it black text on a red background (see here for a list of color codes):

OTHER_WRITABLE 30;41 # dir that is other-writable (o+w) and not sticky 

You don't need to have all the defaults, you can also just create a file with a single line, redefining just the one you want to change. Anyway, once you have created the file, load it with:

eval "$(dircolors ~/.dircolors)"; 

And here it is in action:

enter image description here

To have that happen automatically, add the eval command above to your ~/.bashrc file.

added 7 characters in body
Source Link
terdon
  • 252.7k
  • 69
  • 481
  • 719

The colors of ls can represent the permissions, the defaults for some systems is to show directories where everyone has write permissions with a green background:

enter image description here

You can change the colors by editing your $LS_COLORS variable using dircolors (from man ls):

 Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it. 

The syntax is admittedly kind of annoying here but you can change this color by creating a file with the colors you want and saving it as ~/.dirnamedircolors:

dircolors -p > ~/.dirnamedircolors 

That command will print the defaults into ~/.dirnamedircolors. You will then need to edit that file and change this line:

OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky 

For example, to make it black text on a red background (see here for a list of color codes):

OTHER_WRITABLE 30;41 # dir that is other-writable (o+w) and not sticky 

You don't need to have all the defaults, you can also just create a file with a single line, redefining just the one you want to change. Anyway, once you have created the file, load it with:

eval "$(dircolors ~/.dircolors)"; 

And here it is in action:

enter image description here

To have that happen automatically, add the eval command above to your ~/.bashrc file.

The colors of ls can represent the permissions, the defaults for some systems is to show directories where everyone has write permissions with a green background:

enter image description here

You can change the colors by editing your $LS_COLORS variable using dircolors (from man ls):

 Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it. 

The syntax is admittedly kind of annoying here but you can change this color by creating a file with the colors you want and saving it as ~/.dirname:

dircolors -p > ~/.dirname 

That command will print the defaults into ~/.dirname. You will then need to edit that file and change this line:

OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky 

For example, to make it black text on a red background (see here for a list of color codes):

OTHER_WRITABLE 30;41 # dir that is other-writable (o+w) and not sticky 

You don't need to have all the defaults, you can also just create a file with a single line, redefining just the one you want to change. Anyway, once you have created the file, load it with:

eval "$(dircolors ~/dircolors)"; 

And here it is in action:

enter image description here

To have that happen automatically, add the eval command above to your ~/.bashrc file.

The colors of ls can represent the permissions, the defaults for some systems is to show directories where everyone has write permissions with a green background:

enter image description here

You can change the colors by editing your $LS_COLORS variable using dircolors (from man ls):

 Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it. 

The syntax is admittedly kind of annoying here but you can change this color by creating a file with the colors you want and saving it as ~/.dircolors:

dircolors -p > ~/.dircolors 

That command will print the defaults into ~/.dircolors. You will then need to edit that file and change this line:

OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky 

For example, to make it black text on a red background (see here for a list of color codes):

OTHER_WRITABLE 30;41 # dir that is other-writable (o+w) and not sticky 

You don't need to have all the defaults, you can also just create a file with a single line, redefining just the one you want to change. Anyway, once you have created the file, load it with:

eval "$(dircolors ~/.dircolors)"; 

And here it is in action:

enter image description here

To have that happen automatically, add the eval command above to your ~/.bashrc file.

Source Link
terdon
  • 252.7k
  • 69
  • 481
  • 719

The colors of ls can represent the permissions, the defaults for some systems is to show directories where everyone has write permissions with a green background:

enter image description here

You can change the colors by editing your $LS_COLORS variable using dircolors (from man ls):

 Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it. 

The syntax is admittedly kind of annoying here but you can change this color by creating a file with the colors you want and saving it as ~/.dirname:

dircolors -p > ~/.dirname 

That command will print the defaults into ~/.dirname. You will then need to edit that file and change this line:

OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky 

For example, to make it black text on a red background (see here for a list of color codes):

OTHER_WRITABLE 30;41 # dir that is other-writable (o+w) and not sticky 

You don't need to have all the defaults, you can also just create a file with a single line, redefining just the one you want to change. Anyway, once you have created the file, load it with:

eval "$(dircolors ~/dircolors)"; 

And here it is in action:

enter image description here

To have that happen automatically, add the eval command above to your ~/.bashrc file.