Bash Script Colors Cheat Sheet by Chrissoper1 Via Cheatography.Com/24894/Cs/8483
Total Page:16
File Type:pdf, Size:1020Kb
Bash Script Colors Cheat Sheet by chrissoper1 via cheatography.com/24894/cs/8483/ TPUT Control Codes LS_COLORS File Codes ANSI Control Codes setf Foreground color (text) Block Device (buffered) bd Reset 0 setaf Foreground color (ANSI escaped) File with Capability ca Bold 1 setb Background color Character Device (unbuff ered) cd Dim 2 setab Background color (ANSI escaped) Directory di Underline on 4 bold Brighten all colors Door do Underline off 24 dim Darken all colors End Code ec Blink start 5 rev Reverse color pallete Executable File ex Blink end 25 smul Begin underli ning File fi Inverse pallete start 7 rmul Stop underli ning Left Code lc Inverse pallete end 27 smso Enter Standout Mode Symbolic Link ln Conceal 8 rmso Exit Standout Mode Multi Hard Link mh Normal 22 (File with more than one link) smcup Clear see console _co des(4) for more informa tion clear Clear Missing File mi (Pointed to by a symlink) reset Reset Screen Size ANSI Color Codes Orphaned Symbolic Link or rmcup Restore Color Text Backg rou nd (Points to a missing file) sgr0 Revert all attribute changes Black 30 40 Other-W rit able Directory ow Red 31 41 Usage: tput <con tro l> [color] Named Pipe pi Red Hello: Green 32 42 Right Code rc tput setaf 1;echo "H ell o";tput sgr0 Yellow 33 43 Socket File so Light Green ps: Blue 34 44 tput setaf 2;tput bold;ps ;tput sgr0 Directory Sticky (+t) st Magenta 35 45 File setuid (u+s) su Cyan 36 46 TPUT Color Codes Sticky AND Other-W rit able tw Light Grey 37 47 Black 0 File Extension Specific *.example Red 1 .example Green 2 Create a dircolors file with dircolors -p > Yellow 3 ~/.dircolors Blue 4 see dir_col ors (1), dir_col ors(5) for more info Magenta 5 Cyan 6 Light Grey 7 By chrissoper1 Published 22nd June, 2016. Sponsored by Readability-Score.com cheatography.com/chrissoper1/ Last updated 22nd June, 2016. Measure your website readability! Page 1 of 1. https://readability-score.com.