Installing the LS with color resolution on Solaris

Source: Internet
Author: User
Tags command line

The directories or files displayed after the default LS is not colored in Solaris, and if you want to make it look like Linux, you need the following steps

First, go to www.sunfreeware.com download coreutils-4.5.4-sol9-sparc-local.gz

Second, the following 10 steps to complete

1. Color output is a feature of the gun version of LS command, so you have to get this version first, you can download sunfreeware.com here.

2. Install the package using the following command:

Root@host/var/tmp> pkgadd-d coreutils-4.5.4-sol9-sparc-local

You will be prompted that the following packages will be used:

1 Smccoreu coreutils (SPARC) 4.5.4

Select Package (s) wish to process (or @ #all @# to process

All packages). (Default:all) [?,??, Q]: Enter

--output ommitted--

3. This process will install and gun LS as well as other useful programs to/usr/local/bin. Check this directory.

4. The documentation information for these commands can be found in the/usr/local/doc and/usr/local/man directories to read the new commands, such as color display:

User@host ~> man-m/usr/local/man dircolors

Later, confirm that Manpath variable contains/usr/local/man.

5. You can add color display settings to the entire system, and if so, you need to create a dir_colors file in the/etc directory. That's about it:

User@host ~> cat/etc/dir_colors

# Configuration file for the color LS utility

# This file is goes in The/etc directory, and must is world readable.

# You can copy this file to. dir_colors into your $HOME directory to override

# The system defaults.

# COLOR needs one of these arguments: @ #tty @# colorizes output to TTYs, but not

# pipes. @ #all @# adds color characters to all output. @ #none @# shuts colorization

# off.

COLOR TTY

# Extra command line options for LS go.

# basically these ones are:

# f = Show @#/@# for dirs, @#*@# for executables, etc.

#-T 0 = don@ #t Trust tab spacing when formatting ls output.

Options-f-T 0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.