×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Paul Allies Allies
Added: Aug 16, 2012 12:01 PM
Views: 22
Tags: no tags
This is a script to display files/directories in a certain way using the command ls
  1. //find and open /etc/profile or .profile or what ever....
  2. alias ls='ls --color'
  3. LS_COLORS='di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rpm=90'
  4. export LS_COLORS
  5.  
  6. di = directory
  7. fi = file
  8. ln = symbolic link
  9. pi = fifo file
  10. so = socket file
  11. bd = block (buffered) special file
  12. cd = character (unbuffered) special file
  13. or = symbolic link pointing to a non-existent file (orphan)
  14. mi = non-existent file pointed to by a symbolic link (visible when you type ls -l)
  15. ex = file which is executable (ie. has 'x' set in permissions).
  16.  
  17. 0   = default colour
  18. 1   = bold
  19. 4   = underlined
  20. 5   = flashing text
  21. 7   = reverse field
  22. 31  = red
  23. 32  = green
  24. 33  = orange
  25. 34  = blue
  26. 35  = purple
  27. 36  = cyan
  28. 37  = grey
  29. 40  = black background
  30. 41  = red background
  31. 42  = green background
  32. 43  = orange background
  33. 44  = blue background
  34. 45  = purple background
  35. 46  = cyan background
  36. 47  = grey background
  37. 90  = dark grey
  38. 91  = light red
  39. 92  = light green
  40. 93  = yellow
  41. 94  = light blue
  42. 95  = light purple
  43. 96  = turquoise
  44. 100 = dark grey background
  45. 101 = light red background
  46. 102 = light green background
  47. 103 = yellow background
  48. 104 = light blue background
  49. 105 = light purple background
  50. 106 = turquoise background