Sponsored Content
Full Discussion: Problem with ls
Top Forums UNIX for Dummies Questions & Answers Problem with ls Post 302747105 by vnayak on Thursday 20th of December 2012 02:14:16 PM
Old 12-20-2012
Quote:
Originally Posted by Don Cragun
For ls to perform colorization, it has to determine the terminal type of the output device. The ls utility does this by trying to determine the terminal type of the file descriptor associated with standard output. When you pipe the output of ls through sort, the output device is a pipe, not a terminal so it can't perform colorization.
Hi Don,

Many thanks for the explanation. Now I understand.

Regards,

vnayak.Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SSH Problem auth problem

Hi, Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode: warning: You have no controlling tty. Cannot read confirmation.^M warning: Authentication failed.^M Disconnected; key exchange or algorithm negotiation... (1 Reply)
Discussion started by: budrito
1 Replies

2. Shell Programming and Scripting

problem with dd command or maybe AFS problem

Hi, folks. Sorry for bothering, but maybe someone could help me please. The problem is the following: there is some script that copies files from local file system to AFS. The copying is performed with dd command. The script copies data into some AFS volumes. The problem appeared with one... (0 Replies)
Discussion started by: Anta
0 Replies

3. Shell Programming and Scripting

ssh script problem problem

Hi Please help me with the following problem with my script. The following block of code is not repeating in the while loop and exiting after searching for first message. input_file ========== host001-01 host001-02 2008-07-23 13:02:04,651 ConnectionFactory - Setting session state... (2 Replies)
Discussion started by: pcjandyala
2 Replies

4. Solaris

problem in finding a hardware problem

Hi I am right now facing a strange hardware problem. System get booted with the following error: Fatal Error Reset CPU 0000.0000.0000.0003 AFSR 0100.0000.0000.0000 SCE AFAR 0000.07c6.0000.1000 SC Alert: Host System has Reset It happen 4 or 5 times and get the same error every time.I... (8 Replies)
Discussion started by: girish.batra
8 Replies

5. AIX

user login problem & Files listing problem.

1) when user login to the server the session got colosed. How will resolve? 2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem? Thanks in advance. (1 Reply)
Discussion started by: pernasivam
1 Replies

6. Red Hat

Mail Problem. Maybe, it is a DNS Problem!

Hi, i've a redhat linux 9 upadated by redhat from 7 version to 9 version. A couple of days ago i was a problem with my mail, in other words i'm not able to get any email nor to send any email. I've a proxy configuration and i tried to set iptables in order to verify the port. The 110,255 and 995... (1 Reply)
Discussion started by: pintalgi
1 Replies

7. UNIX for Dummies Questions & Answers

DHCP problem and eth1 problem

At work I am trying to get this one Linux machine (let's call it ctesgm07) to behave like another Linux machine that we have (let's call it test007). test007 returns the following version info: cat /etc/debian_version: lenny/sid uname -a: Linux test007 2.6.27-7-generic #1 SMP Tue Nov 4... (0 Replies)
Discussion started by: sllinux
0 Replies

8. AIX

AIX OS problem? network problem?

Dear ALL. I installed AIX OS on customer sites. but Only one site is too slow when I connected telnet, ftp.. Ping is too fast. but telnet and FTP is not connected.. of course i check the configuration file on aix but it's normal. Do any Idea?? thanks in advance. - Jun - (3 Replies)
Discussion started by: Jeon Jun Seok
3 Replies

9. IP Networking

Problem with forwarding emails (SPF problem)

Hi, This is rather a question from a "user" than from a sys admin, but I think this forum is apropriate for the question. I have an adress with automatic email forwarding and for some senders (two hietherto), emails are bouncing. This has really created a lot of problems those two time so I... (0 Replies)
Discussion started by: carwe
0 Replies

10. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore. Here is what 's happening: * I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies
TERMINAL_COLORS.D(5)						 terminal-colors.d					      TERMINAL_COLORS.D(5)

NAME
terminal-colors.d - Configure output colorization for various utilities SYNOPSIS
/etc/terminal-colors.d/[[name][@term].][type] DESCRIPTION
Files in this directory determine the default behavior for utilities when coloring output. The name is a utility name. The name is optional and when none is specified then the file is used for all unspecified utilities. The term is a terminal identifier (the TERM environment variable). The terminal identifier is optional and when none is specified then the file is used for all unspecified terminals. The type is a file type. Supported file types are: disable Turns off output colorization for all compatible utilities. enable Turns on output colorization; any matching disable files are ignored. scheme Specifies colors used for output. The file format may be specific to the utility, the default format is described below. If there are more files that match for a utility, then the file with the more specific filename wins. For example, the filename "@xterm.scheme" has less priority than "dmesg@xterm.scheme". The lowest priority are those files without a utility name and terminal iden- tifier (e.g. "disable"). The user-specific $XDG_CONFIG_HOME/terminal-colors.d or $HOME/.config/terminal-colors.d overrides the global setting. EXAMPLES
Disable colors for all compatible utilities: touch /etc/terminal-colors.d/disable Disable colors for all compatible utils on a vt100 terminal: touch /etc/terminal-colors.d/@vt100.disable Disable colors for all compatible utils except dmesg(1): touch /etc/terminal-colors.d/disable touch /etc/terminal-colors.d/dmesg.enable DEFAULT SCHEME FILES FORMAT
The following statement is recognized: name color-sequence The name is a logical name of color sequence (for example "error"). The names are specific to the utilities. For more details always see the COLORS section in the man page for the utility. The color-sequence is a color name, ASCII color sequences or escape sequences. Color names black, blink, blue, bold, brown, cyan, darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, lightmagenta, lightred, magenta, red, reset, reverse, and yellow. ANSI color sequences The color sequences are composed of sequences of numbers separated by semicolons. The most common codes are: 0 to restore default color 1 for brighter colors 4 for underlined text 5 for flashing text 30 for black foreground 31 for red foreground 32 for green foreground 33 for yellow (or brown) foreground 34 for blue foreground 35 for purple foreground 36 for cyan foreground 37 for white (or gray) foreground 40 for black background 41 for red background 42 for green background 43 for yellow (or brown) background 44 for blue background 45 for purple background 46 for cyan background 47 for white (or gray) background Escape sequences To specify control or blank characters in the color sequences, C-style -escaped notation can be used: a Bell (ASCII 7)  Backspace (ASCII 8) e Escape (ASCII 27) f Form feed (ASCII 12) Newline (ASCII 10) Carriage Return (ASCII 13) Tab (ASCII 9) v Vertical Tab (ASCII 11) ? Delete (ASCII 127) \_ Space \ Backslash () ^ Caret (^) # Hash mark (#) Please note that escapes are necessary to enter a space, backslash, caret, or any control character anywhere in the string, as well as a hash mark as the first character. For example, to use a red background for alert messages in the output of dmesg(1), use: echo 'alert 37;41' >> /etc/terminal-colors.d/dmesg.scheme Comments Lines where the first non-blank character is a # (hash) are ignored. Any other use of the hash character is not interpreted as introducing a comment. FILES
$XDG_CONFIG_HOME/terminal-colors.d $HOME/.config/terminal-colors.d /etc/terminal-colors.d ENVIRONMENT
TERMINAL_COLORS_DEBUG=all enables debug output. COMPATIBILITY
The terminal-colors.d functionality is currently supported by all util-linux utilities which provides colorized output. For more details always see the COLORS section in the man page for the utility. AVAILABILITY
terminal-colors.d is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils /util-linux/>. util-linux January 2014 TERMINAL_COLORS.D(5)
All times are GMT -4. The time now is 05:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy