Some miscellaneous BASH tricks. Useful tips for all Linux users.

This command shows how to display a listing of files with ls and show line numbers at the same time. homer@deep-thought ~/Desktop/Site % ls | nl 1 back.jpg 2 bejiitas_phpb1 3 bejiitas_phpb1.sql 4 cgi-bin 5 Files.tar.lzma 6 Map07Tufb.zip 7 my2.tar.lzma 8 program.c 9 quake38.jpg 10 sysinfo 11 tekcrazy_2.zip 12 wrap.rarhomer@deep-thought ~/Desktop/Site % ls | nl … Read more

Using the dircolors command in your ~/.bashrc.

Using the dircolors command in your ~/.bashrc. The dircolors command as used in your ~/.bashrc will set the colours of the various files and directories that are shown with the ls(1) command. Use the command dircolors –print-database to display a list of the filetypes and what colour codes will be used for each one. [ … Read more