在Solaris上安装带颜色分辨的ls
副标题[/!--empirenews.page--] solaris下默认的ls后显示的目录或者文件等等是不带颜色的,如果要使其像linux下,那么需要如下步骤 一、去www.sunfreeware.com下载coreutils-4.5.4-sol9-sparc-local.gz 二、以下分十步完成 1. 彩色输出是GUN版本ls命令的一个特征,所以你必须先得到这个版本,你可以在这里下载sunfreeware.com. 2. 使用下面的命令安装该包: root@host /var/tmp> pkgadd -d coreutils-4.5.4-sol9-sparc-local 会提示你以下的包将会被用到: 1 SMCcoreu coreutils (sparc) 4.5.4 Select package(s) you wish to process (or @#all@# to process all packages). (default: all) [?,??,q]: 回车即可 --output ommitted-- 3. 这个过程将安装和GUN ls以及其它有用的程序到 /usr/local/bin. 检查这个目录. 4. 这些命令的文档信息可以在 /usr/local/doc 和 /usr/local/man目录中找到,阅读这些文档来了解新的命令,例如,彩色显示: user@host ~> man -M /usr/local/man dircolors 稍后, 确认 MANPATH variable 包含 /usr/local/man. 5. 可以给整个系统添加彩色显示设置, 如果那样的话,你需要在 /etc目录下建立一个DIR_COLORS文件。 大约是这样的: user@host ~> cat /etc/DIR_COLORS # Configuration file for the color ls utility # This file goes in the /etc directory, and must be world readable. # You can copy this file to .dir_colors in 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 here. # 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 (编辑:徐州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |