Contributed by jason on from the double-rainbow-omg dept.
Mark Solocinski has kindly given us permission to reprint one of his recent blog posts. This is a nice quick tip for getting color "ls" output in your terminal.
Want to add some color to your shell environment? FreeBSD and most Linux distros have color options included in the "ls" utility by default. OpenBSD doesn’t but but it’s very easy to add. We just need to install the colorls package (sysutils/colorls in ports).# pkg_add colorls
Colorls works exactly the same as regular "ls". To get the color option you just need to use the -G option. If you want it to replace "ls" for regular work you can create an alias in your favorite shell’s environment file. The output for file and directory listings will now have a different color for different types of files.White = regular file Purple = directory Red = executable file Magenta = symbolic link White highlight = Set Group ID enabled Red highlight = Set User ID enabled Yellow highlight = Sticky bit enabled
Enjoy! Almost as good as getting the window seat at work.
(Comments are closed)