Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


RTFM | 24 comments | Create New Account
Click here to return to the 'RTFM' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
RTFM
Authored by: snooze on Apr 12, '04 12:11:05PM

This hint really isn't that accurate. While the command options might be a little different, Panther allows color with ls. And I don't see anything absurd about the numbers du and df are reporting (unless you mean that reporting in 512-byte blocks is absurd). For color ls, just put the following in your .profile (assuming you are using bash):

export CLICOLOR=1

Also, by default df and du show things in 512-byte blocks (this isn't anything specific to Panther, many unixes do this by default). To have it show in 1K blocks use -k. Or put it in your .profile (assuming you are using bash):

alias df='df -k'
alias du='df -k'

This is all documented in the man pages for those commands.



[ Reply to This | # ]
RTFM
Authored by: robeen on Apr 12, '04 03:29:23PM

The ls -G is fine for terminal - but it does not work for me using the X11 xterm...which I mainly use.

The coreutils ls works in both.

If you can get the standard ls to work in xterm, maybe someone could post how to do so! Thanks -

Rob



[ Reply to This | # ]
RTFM
Authored by: Nugget on Apr 12, '04 04:17:26PM

This is an artifact of your $TERM environment variable. The default is "xterm" which doesn't indicate a color-capable device.

Try setting TERM to xterm-color and it will work fine.

export TERM=xterm-color (bash)
setenv TERM xterm-color (tcsh)



[ Reply to This | # ]
RTFM
Authored by: otomo on Apr 15, '04 12:50:36AM
From the manpage man ls:
CLICOLOR Use ANSI color sequences to distinguish file types. See LSCOLORS below. In addition to the file types mentioned in the -F option some extra attributes (setuid bit set, etc.) are also displayed. The colorization is dependent on a terminal type with the proper termcap(5) capabili- ties. The default ``cons25'' console has the proper capabilities, but to display the colors in an xterm(1), for example, the TERM variable must be set to ``xterm-color''. Other terminal types may require simi- lar adjustments. Colorization is silently disabled if the output isn't directed to a terminal unless the CLICOLOR_FORCE variable is defined.

CLICOLOR_FORCE Color sequences are normally disabled if the output isn't directed to a terminal. This can be overridden by set- ting this flag. The TERM variable still needs to refer- ence a color capable terminal however otherwise it is not possible to determine which color sequences to use.
So set CLICOLOR_FORCE to 1 if you feel really sure about what you are doing. Don't forget to set TERM to something meaningful!

Good luck!

And personally I prefer to install almost everything in my user account, then I modify my PATH as needed. This way if anything happens to my install, a simple restore of files in my home directory is ALL that is needed to bring myself back to where I am now. (well outside of a reboot and installation of some applications) As a longtime FreeBSD user, I prefer the BSD utils, but your preference.

[ Reply to This | # ]