Herramientas de usuario

Herramientas del sitio


informatica:sistemas_operativos:linux:coreutils:ls

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
informatica:sistemas_operativos:linux:coreutils:ls [2021/08/24 12:33] – [Colores] tempwininformatica:sistemas_operativos:linux:coreutils:ls [2021/08/26 08:30] (actual) – [Script] tempwin
Línea 37: Línea 37:
 Posibilidades de efectos: Posibilidades de efectos:
  
-^ Valor  ^ Descripción +^ Valor ^ Descripción 
-| 0      | Color por defecto +| 0     | Color por defecto 
-| 1      | Negrita | +| 1     | Negrita | 
-| 4      | Subrayado +| 4     | Subrayado 
-| 5      | Parpadeo +| 5     | Parpadeo 
-| 7      | Intercambia los colores de texto y de fondo  | +| 7     | Intercambia los colores de texto y de fondo  | 
-| 8      | Invisible  |+| 8     | Invisible  | 
 + 
 +Posibilidades de colores: 
 + 
 +^ Valor ^ Descripción 
 +| 30 | Negro  | 
 +| 31 | Rojo  | 
 +| 32 | Verde  | 
 +| 33 | Naranja 
 +| 34 | Azul  | 
 +| 35 | Morado 
 +| 36 | Cián  | 
 +| 37 | Gris  | 
 +| 90 | Gris oscuro   | 
 +| 91 | Rojo claro  | 
 +| 92 | Verde claro  | 
 +| 93 | Amarillo 
 +| 94 | Azul claro  | 
 +| 95 | Morado claro  | 
 +| 96 | Turquesa 
 +| 97 | Blanco  |
  
 Posibilidades de fondos: Posibilidades de fondos:
Línea 65: Línea 85:
 | 107   | Blanco       | | 107   | Blanco       |
  
 +Tipos de ficheros:
 +
 +^ Valor  ^ Descripción  ^
 +| ''bd'' | = (BLOCK, BLK)   Block device (buffered) special file  |
 +| ''cd'' | = (CHAR, CHR)    Character device (unbuffered) special file  |
 +| ''di'' | = (DIR)  Directory  |
 +| ''do'' | = (DOOR) [Door][1]  |
 +| ''ex'' | = (EXEC) Executable file (ie. has 'x' set in permissions)  |
 +| ''fi'' | = (FILE) Normal file  |
 +| ''ln'' | = (SYMLINK, LINK, LNK)   Symbolic link. If you set this to ‘target’ instead of a numerical value, the color is as for the file pointed to.  |
 +| ''mi'' | = (MISSING)  Non-existent file pointed to by a symbolic link (visible when you type ls -l)  |
 +| ''no'' | = (NORMAL, NORM) Normal (non-filename) text. Global default, although everything should be something  |
 +| ''or'' | = (ORPHAN)   Symbolic link pointing to an orphaned non-existent file  |
 +| ''ow'' | = (OTHER_WRITABLE)   Directory that is other-writable (o+w) and not sticky  |
 +| ''pi'' | = (FIFO, PIPE)   Named pipe (fifo file)  |
 +| ''sg'' | = (SETGID)   File that is setgid (g+s)  |
 +| ''so'' | = (SOCK) Socket file  |
 +| ''st'' | = (STICKY)   Directory with the sticky bit set (+t) and not other-writable  |
 +| ''su'' | = (SETUID)   File that is setuid (u+s)  |
 +| ''tw'' | = (STICKY_OTHER_WRITABLE)    Directory that is sticky and other-writable (+t,o+w)  |
 +| ''*.extension'' | =   Every file using this extension e.g. *.rpm = files with the ending .rpm  |
  
  
   * [[https://geoff.greer.fm/lscolors/|LS_COLORS generator]]   * [[https://geoff.greer.fm/lscolors/|LS_COLORS generator]]
 +  * [[https://github.com/trapd00r/LS_COLORS|Colección de definiciones para LS_COLORS]] (GitHub)
 +
 +==== Script ====
 +
 +Para comprobar rápidamente cómo se ven todos los colores y estilos en la terminal, se pueden usar los siguientes scripts:
 +
 +<code bash>
 +for i in 00{2..8} {0{3,4,9},10}{0..7}
 +do echo -e "$i \e[0;${i}mEsto es un texto\e[00m  \e[1;${i}mEsto es un texto\e[00m"
 +done
 +</code>
 +
 +{{ :informatica:sistemas_operativos:linux:coreutils:ls_colors_script.png?nolink |}}
 +
 +Con este otro se muestran todos los colores en negrita o con su color por defecto:
 +
 +<code bash>
 +for i in 00{2..8} {0{3,4,9},10}{0..7}
 +do for j in 0 1
 +   do echo -e "$j;$i \e[$j;${i}mEsto es un texto\e[00m"
 +   done
 +done
 +</code>
 +
 +
informatica/sistemas_operativos/linux/coreutils/ls.1629801238.txt.gz · Última modificación: por tempwin